Let us set some context:
1.You have a set of projects created using VS 2005 targetting .Net 2.0
2.You use Nant 0.85 as the build system and use NantContrib 0.85 for msbuild task.
3.You also have a new bunch of projects which you are building on VS 2008 targeting 3.5
Now the problem:
How do I have just VS 2008 to build projects targeting .Net 3.5 framework as well as .Net framework 2.0 in conjunction with Nant?
The solution:
1.Replace Nant 0.85 with Nant 0.86 Beta 1. You might ask a question, why to use a beta version? Nant v0.85 only support targeting .Net framework 2.0 or lesser. Nant 0.86 supports targeting all of the .Net versions. Moreover in all our testing our dev environment, 0.86 beta 1 was much stabler and did its job well.
2.Retain the existing NantContrib 0.85 bin files. Nant v0.86 will enable NantContrib to pick the right MSBuild.exe. This is Nant magic!
3.Open your existing projects created using VS 2005 in VS 2008. Allow VS 2008 to convert the solution and project formats to be compatible with VS 2008. Post conversion, VS 2008 will target to .Net framework 2.0 automatically for all of the projects in the solution.
Now kick-off your Nant build tool to do its usual build and voila, the build is green without any issues!
Have a great weekend!
{ 1 comment… read it below or add one }
But – the target is gone in .86 of Nant
what do you use?