EditDescription
Building binaries that target the .NET 1.1 framework with Team Build is possible. It's a little tricky but I have seen it done by a few customers.
The key bit of technology that enables this is the
MSBuild Extras - Toolkit for .NET 1.1 MSBee. The name MSBee comes from
MSBuild
Environment for
Everett.
Everett is the codename given to Visual Studio 2003.
EditOptions
To use MSBee
the project file must be in Visual Studio 2005 format. Obviously that can present a problem. If you convert your VS2003 projects to VS2005 and use the VS2005 IDE, you have the potential to use .NET2.0 features which won't compile in .NET1.1.
There are four ways to get this solution working, each with their own tradeoffs.
- Upgrade to VS2005 and .NET 2.0. Not always an option :)
- Install VS2003 on the build server and execute DevEnv.exe
- Convert the project and solution to VS2005 format, use the VS2005 IDE and educate your developers on what new features to stay away from.
- Continue to use VS2003 and dynamically convert the project file to VS2005 as part of the build process.
This recipe deals with the last three options.
EditPrerequisites
EditOption #2 - DevEnv.exe
The downside of using this approach is that you don't get feedback in the Team Build log. You won't know where the build is up to, and the results won't be as rich as the other options.
You can do this using an <Exec> task, or using Aaron Hallberg's wrapper around DevEnv.
See the following pages for more information:
EditOption #3 - Convert projects once-off and use MSBee
- Open your solution in Visual Studio 2005/2008
- The upgrade wizard should automatically run
- Checkin the upgraded files
- Copy BuildingFx11inTB.targets (see prerequisites) to your build server: C:\Program Files\MSBuild
Add the following to your TFSBuild.proj:
<Import Project="$(MSBuildExtensionsPath)\BuildingFx11inTB.targets" />
EditOption #4 - Convert projects dynamically and use MSBee
This task will automatically add the required <Include> to the MSBee .targets files.
Add the following to your TFSBuild.proj file:
<UsingTask
TaskName="ConvertTo2005"
AssemblyFile="$(MSBuildExtensionsPath)\ConvertTo2005Task.dll" />
<ConvertTo2005 Project="VS2003Project.csproj">
<Output TaskParameter="OutputFileName" PropertyName="ConvertedProject" />
</ConvertTo2005>
<MSBuild Projects="$(ConvertedProject)" Properties="TargetFX1_1=true" />
EditNotes
- These options are simplified here and you should refer to the original linked sources for more detailed instructions.