NAnt + VS2008 csproj annoying thing

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Ok, so you have an automated script for building your system… yes?

You decide to plug in in another your c# projects created by Visual Studio 2008 and run them via msbuild task and then it brakes… MSBuild tells you that it can’t find c# targets.

You go to your project file and see that it actually uses now a new property for setting up the tools path which obviously NAnt (or the community contrib task MSBuild) cannot resolve:

<Import Project=”$(MSBuildToolsPath)\Microsoft.CSharp.targets” />

The fix is actually quite easy, but still it annoyes me :)

Change the above to the old version:

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

And it works like a charm! only it annoyes me :)

Hope this helps someone!

Cheers!


Filed under: C#, VS2008
Written on: 20 Jan 2008 ·

kick it on DotNetKicks.com

Leave a Reply