Using MSBuild/MSBee to compile a .NET 1.1 C# project

Topics: For MSBee Users
Sep 21, 2006 at 9:52 AM
Hi, I have a .NET 1.1 project with a single C# file (actually it's the Wintalk sample distributed with .NET 1.1 SDK). I have written with my little hands a proj file and the idea is to call from a msbuild task from CruiseContol.NET to compile my .NET 1.1 project. I don't want to use Nant as we're planning to migrate to .NET 2.0 soon.

I have previously installed in this order: .NET 1.1 FX, .NET 1.1 SDK, .NET 2.0, MSBee 1.0. My command line is:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe build.proj /v:diag /p:TargetFX1_1=true

The problem I have is that for some reasons MSBee overwrites properly all the tasks targetted by MSbee to point to .NET 1.1... except my Csc task which still points to .NET 2.0.

My import line in the proj file is:

<Import Project="$(MSBuildExtensionsPath)\MSBee\MSBuildExtras.Fx11.CSharp.targets" Condition=" '$(BuildingInsideVisualStudio)'=='' AND '$(TargetFX11)'=='true' "/>

and MSBee seams to kick in properly as I can see the difference when I use the /p:TargetFX1_1 switch.

On the console I see the following "Using" logs (further below). My question really is why is it using Csc from FX 2.0, shouldn't my import point this task to the FX 1.1 location (see last block in the console logs below)? Many thanks in advance for pointing me in the right direction!

Using "Message" task from assembly "Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".

Using "GetFrameworkPath" task from assembly "C:\Program Files\MSBuild\MSBee\MSBee.dll".

Using "GetFrameworkSdkPath" task from assembly "C:\Program Files\MSBuild\MSBee\MSBee.dll".

Using "GenerateResource" task from assembly "C:\Program Files\MSBuild\MSBee\MSBee.dll".
Copying file from "C:\Program Files\Microsoft.NET\SDK\v1.1\bin\Resgen.exe" to "C:\WINDOWS\TEMP\tmp51\Resgen.exe".
C:\WINDOWS\TEMP\tmp51\Resgen.exe /compile props.txt,props.resources
The "GenerateResource" task is using "Resgen.exe" from "C:\WINDOWS\TEMP\tmp51\Resgen.exe".

Using "Csc" task from assembly "Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /out:cs\wintalk.exe /target:winexe cs\WinTalk.cs
The "Csc" task is using "Csc.exe" from "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe".