It looks like there are (at least) two options for getting nant to use csproj files: using the task of NAntContrib or using msbuild.exe directly (e.g., codecampserver). Am I reading this right, and if so, what is the advantage of using msbuild.exe over the NAntContrib task?
+4
A:
The NAntContrib assumes .NET Framework V2.0. If you want to use .NET 3.5, you'll need to use MsBuild.exe.
Here's an example:
<property name="MSBuildPath" value="C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe"/>
<target name="build">
<exec program="${MSBuildPath}">
<arg line='"${SolutionFile}"' />
<arg line="/property:Configuration=${SolutionConfiguration}" />
<arg value="/target:Rebuild" />
<arg value="/verbosity:normal" />
<arg value="/nologo" />
<arg line='/logger:"C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll"'/>
</exec>
</target>
Babak Naffas
2009-07-29 18:23:21
Wow, thanks. I never imagined that NAntContrib was so far behind.
Keith Morgan
2009-07-30 11:37:58
-1 You can use <msbuild> with .NET 3.5. Make sure You have the latest nightlies of NAnt and NAntContrib (tested NAnt Nightly 20090130 and NAntContrib Nightly 20090201).
The Chairman
2009-09-08 09:16:57