Building .NET 1.1 application using Team Build
One of the FAQs in Team Foundation forums have been on "how to build .NET 1.1 application using Team Build". My colleague Nagaraju put up this blog to give out detailed steps for this. Apart from this, there were various other solutions on how to build .NET 1.1 using MSBuild (and hence in turn by Team Build) from different folks like one by Jomo.
All this solutions were essentially a hack... they mostly worked but lacked elegance. The developers wanted better solution. Considering the increasing demand for better support for building .NET 1.1 using MSBuild, the MSBuild team came up with project called MSBee or MSBuild Everett (code name for VS 2003) Environment. The Beta 2 of MSBee is available here.
The MSBee could be used with Team Build also. To do so, you need to do the following -
- Install MSBee and other required components on the Build Machine. (Refer MSBee ReadMe)
- Upgrade the solutions that you want to build to Visual Studio 2005 format using the wizard or the /upgrade command line switch. (If you want to still use VS 2003, you can backup the solutions and upgrade.)
- Modify the TFSBuild.proj file as mentioned below.
The modification required in TFSBuild.proj are -
a) Download and checkin the attached BuildingFx11inTB.targets alongside TFSBuild.proj. (I am trying attachment to a blog for the first time... hopefully it will work!)
b) Add an import statement to TFSBuild.proj file after import of Microsoft.TeamFoundation.Build.targets file. The import statement would look like -
<
Import Project="$(MSBuildProjectDirectory)\BuildingFx11inTB.targets" />
c) Add following property to point to the 1.1 targets file -
<
PropertyGroup> <AdditionalPropertiesForBuildTarget>CustomAfterMicrosoftCommonTargets=$(ProgramFiles)\MSBuild\MSBee\MSBuildExtras.Fx1_1.CSharp.targets</AdditionalPropertiesForBuildTarget> </PropertyGroup>
And thats all. The steps a) and b) are required because the current version of the targets file did not provide easy way to pass additional properties while compiling individual project files. We are considering fixing this for next release to simplify this.
Note that the above solutions assume that all your projects are in C#. Instead, if all the projects are in VB, change the MSBuildExtras.Fx1_1.CSharp.targets in the property defination above to MSBuildExtras.Fx1_1.VisualBasic.targets. In case you have mix of C# and VB, use the workaround suggested in section 4.2.2 of "MSBee ReadMe.doc"
Thanks!
Comments
Anonymous
April 19, 2006
The comment has been removedAnonymous
April 19, 2006
Though one of my earlier blogs is titled "Building .NET 1.1 application using Team Build", the principal...Anonymous
April 20, 2006
Gautam Goenka blogs about building .NET 1.1 applications using Team Build and how to write a custom msbuild...Anonymous
April 20, 2006
In my previous Developing MSBee posts, I mentioned some issues I was having with FxCop and NUnit.
Regarding...Anonymous
May 05, 2007
MSBee is one of the good option to integrate .NET 1.1 Projects with VSTF builds. But you need to convertAnonymous
October 20, 2010
Hi , is it possible to integrate msbee to TFS 2010 ? I se vs 2010 for .net 1.1 projects but i could not accomplish that. Gives error below i mentioned; C:Program Files (x86)MSBuildCrossCompile.CSharp.targets (126): The "CFResGen" task could not be loaded from the assembly C:WindowsMicrosoft.NETFrameworkv2.0.50727Microsoft.CompactFramework.Build.Tasks.dll. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.Anonymous
October 21, 2010
The error indicates that you are using .NET 2.0 CF dll. Is this the right one? Is the dll present (because Team Build does not installs it)? Does it has CFResGen projects? If the problem persists, I suggest you put a question to social.msdn.microsoft.com/.../threads forum.