Where is the configuration setting in nant that sets which version of MSBuild to use?
Nant wants to use 3.5 when it needs to use 4.0.
I wrote a blog entry a few years ago that explains how to leverage any version of MSBuild from your NAnt build script. Essentially, you would be using the <exec>
node to make the call to MSBuild as it is installed on your computer.
http://enterpriseyness.com/2009/12/continuous-integration-with-cruise-control-net-nant/
<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>