Building binaries targeting .NET 1.1 and .NET 1.0 in TeamBuild

There are two approaches for building binaries targeting .NET 1.1 and .NET 1.0 in TeamBuild.


Approach# 1

1.       Upgrade VS2003/VS2002 project files to VS2005 using VS2005 upgrade wizard.

2.       Install the msbuild toolkit from here. This toolkit can build msbuild based projects targeting .NET 1.1 and .NET 1.0. Thanks to Robert MCLaws and Jomo Fisher for building such a great toolkit.

3.       Locate the target files installed at %ProgramFiles%\MSBuild\Interscape\MSBuildToolkit

4.       Follow the steps mentioned in Jomo’s blog and update each solution file to target .NET 1.1 and .NET 1.0.

5.       Choose appropriate configuration (platform as ‘.NET 1.0’ or ‘.NET 1.1’) in team build type.

6.       Install this toolkit on build machine.

7.       Install .NET1.1 and .NET1.0 redist on build machine if they are already not installed.

8.       That’s it, kickoff the build!


You may notice that the build process picked up .NET 1.1/.NET1.0 version of compiler and referenced .NET binaries from buildlog.txt.


(Snippet from my build log file)


Project “d:\builddir2\TestProject\Approach1\Sources\TargetNET1.1\TargetNET11.sln” is building “d:\builddir2\TestProject\Approach1\Sources\TargetNET1.1\TargetNET1.1\TargetNET11.csproj” (default targets):

Target PrepareForBuild:

Creating directory “d:\builddir2\TestProject\Approach1\Binaries\.NET 1.1\Debug\”.

Creating directory “obj\.NET 1.1\Debug\”.

Target CoreCompile:

D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Csc.exe /noconfig /warn:4 /define:CODE_ANALYSIS;DEBUG;TRACE;NET11 /reference:D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll /reference:D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll /reference:D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Xml.dll /debug+ /debug:full /optimize- /out:”obj\.NET 1.1\Debug\TargetNET1.1.exe” /target:exe Program.cs Properties\AssemblyInfo.cs


Another beauty is that you can choose to run code analysis also while building these versions. All you need to do is to enable code analysis for this build type J


(Snippet from my build log file)


Target RunCodeAnalysis:

Running Code Analysis…

D:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe  /o:”d:\builddir2\TestProject\Approach1\Binaries\.NET 1.1\Debug\TargetNET1.1.exe.CodeAnalysisLog.xml” /f:”d:\builddir2\TestProject\Approach1\Binaries\.NET 1.1\Debug\TargetNET1.1.exe” /d:”D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322″ /r:D:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules


Approach# 2

In case you don’t have an option of upgrading the project files to VS2005, you will need to use devenv command line ( of the particular version and build. This works well but one difficulty is: TeamBuild needs the project output redirected to one common output folder in order to upload to the release server later on, but you cannot override the output directory with devenv command line. So, you will need either to modify your project files to use one common output directory, or, you will need to know the output directories of individual projects and use them in TeamBuild script to copy separately.


In the below example, I’ve VS2003Application.sln that contains three projects i) VS2003Application.csproj ii) CSWindowsApp.csproj iii) VBApp.vbproj.


I’ve added the following simple script overriding AfterCompile target in my TfsBuild.proj.



<VS2003_Devenv>$(ProgramFiles)\Microsoft Visual Studio .NET 2003\Common7\IDE\</VS2003_Devenv>






<VS2003_OutputFiles Include=$(SolutionRoot)\vs2003\VS2003Application\bin\$(VS2003_Configuration)\**\*.*/>

<VS2003_OutputFiles Include=$(SolutionRoot)\vs2003\CSWindowsApp\bin\$(VS2003_Configuration)\**\*.*/>

<VS2003_OutputFiles Include=$(SolutionRoot)\vs2003\VBApp\bin\**\*.*/>



<Target Name=AfterCompile>

<Exec Command=&quot;$(VS2003_Devenv)&quot; &quot;$(VS2003_SolutionName)&quot; /build $(VS2003_Configuration)/>




Condition=!Exists(‘$(BinariesRoot)\$(VS2003_Configuration)’) />








Couple of things to notice here:

  1. This assumes VS 2003 is installed on the build machine.
  2. I’m using, not devenv.exe.


You can extend this to build any number of solutions and different configurations. And, this can be easily modified to target VS 2002. Hope, this will provide you a starting point. Let me know if you need any further help.



Comments (11)

  1. Clark Sell says:

    The following is my official VSTS jumpstart kit.&amp;nbsp; I will maintain this post entry going forward….

  2. Clark Sell says:

    Internet Links

    Visual Studio Team System Home

    Getting Started with Team Foundation

    MSDN Technical…

  3. Jim Lamb says:


    What is the procedure to backup/restore Team Foundation Server?

    See Buck Hodges’ MSDN…

  4. Clark Sell says:

    The following are some different resources to either convert your Visual Studio 2002/2003 projects to

  5. I have been working with TFS for quite a long time now and has come across a lot of situations where…

  6. I recently had to customize a Team Build script to build only one VS2003 solution and found that Nagaraju…

  7. 一個常問的問題是, 什麼是 MSBuild ? , 什麼是 TeamBuild ? 簡單來說, MSBuild 才是微軟在 建構管理中的核心技術引擎, Team Build 則是 Team Foundation

  8. MSBuild Extras – Toolkit for .NET 1.1 “MSBee” is an addition to MSBuild that allows developers to build

  9. Maor David says:

    Building non-MSBuild projects is possible. For example you have to build VS2003, Installer, C++, Delphi