共用方式為


Build managed applications using Visual Studio 2005 that target .NET 1.1

We have VS2005 installed. What if we need to provide managed app for .NET 1.1? Do we have to install VS2003 as well? Not really, the following steps instruct us how to build .NET 1.1 managed apps under VS2005.

 

1. Make sure that .NET 1.1 SDK installed. Check if “Program Files\Microsoft.NET\SDK\v1.1” exists, otherwise, we can download one from here.

2. Download MSBee and install it. By default, it will locate at “Program Files\MSBuild\MSBee”.

3. Assume we already have VS2005 csproj file (also works for vbporj) and it should be back-compatible with .NET 1.1. Edit it by using any text editor tool, for example, notepad. Find the line

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> ” and insert line

<Import Project="$(MSBuildExtensionsPath)\MSBee\MSBuildExtras.Fx1_1.CSharp.targets" Condition=" '$(BuildingInsideVisualStudio)' == '' AND '$(TargetFX1_1)'=='true'" /> ” after it.

4. Open Visual Studio 2005 Command Prompt (under Start->All Programs->Microsoft Visual Studio 2005->Visual Studio Tools). Go to the directory csproj located and type command

msbuild ourApp.csporj /t:Rebuild /p:TargetFX1_1=true”. From build log in console, we’ll see the project refers to .NET 1.1 SDK.

5. Make sure the folder “FX1_1” is created under bin directory. The managed app or assembly should be inside it. By using “ildasm ourTarget.dll”, the manifest shows version as v1.1.4322. This is exactly what we want.

For other detailed info of MSBee, please refer to its document as "Program Files\MSBuild\MSBee\MSBee ReadMe.doc"

Comments