NAnt and VS2008 (.NET 3.5) - Solution format of file Solution.sln is not supported

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 18:47:28
Matt Campbell

You'll notice that the docs indicate that NAnt's <solution> task doesn't support solution files newer than VS2003.

I recommend using the <msbuild> task from nantcontrib for all projects newer than VS2003.

Also, the .85 version of NAnt only supports framework versions up to 2.0. The purest way to get things working against the 3.5 framework is to use the .86-beta1 versions of NAnt. You'll then be able to use the <msbuild> task against the 3.5 solution.

nant-0.86-beta1 supports 3.5 but not in the solution node how nice. I ended up using this from the nantcontrib:

  <target name="build" description="Compiles using the AutomatedDebug Configuration">
    <!-- <loadtasks assembly="C:\Dev\nant-0.86-beta1\bin\NAnt.Contrib.Tasks.dll"  /> -->
    <msbuild project="${Solution.Filename}">
      <property name="Configuration" value="Release"/>
    </msbuild>
  </target>
Joshua Cauble

See Building the platform code with nant and VS2008

This is here on Stack overflow. Basically you only have a couple of options, control all the builds yourself with project build files, common build files, and a master build file. Or run the Exec task to exectue the correct version of MSBuild for each solution you want compiled.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!