我正在尝试在VS2008 SP1和x64 XP上运行NAnt 0.86b1。
我有一个基本的构建文件(下面),它给出了文件'Solution.sln‘的错误解决方案格式不受支持。
<property name="nant.settings.currentframework" value="net-3.5" />
<target name="build" description="Full Rebuild" depends="clean,compile" />
<target name="clean" description="Cleans outputs">
<delete dir="bin" failonerror="false" />
<delete dir="obj" failonerror="false" />
</target>
<target name="compile" description="Compiles solution">
<solution configuration="debug" solutionfile="Solution.sln" />
</target>
还有没有人遇到过这个问题?我找不到任何有用的东西。
发布于 2008-11-29 17:31:10
您会注意到,文档表明NAnt的>任务不支持比VS2003更新的解决方案文件。
我建议所有比VS2003更新的项目都使用the task from nantcontrib。
此外,NAnt的.85版本仅支持2.0以下的框架版本。最纯粹的方法就是使用NAnt的.86-beta1版本。然后,您将能够对3.5解决方案使用<msbuild>任务。
发布于 2009-01-08 23:20:58
nant-0.86-beta1支持3.5,但不在解决方案节点中,多么好。我最终使用了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>发布于 2009-02-12 22:10:20
请参阅Building the platform code with nant and VS2008
这是在Stack overflow上。基本上,您只有几个选项,通过项目构建文件、公共构建文件和主构建文件自己控制所有构建。或者运行“执行”任务,为要编译的每个解决方案执行正确版本的MSBuild。
https://stackoverflow.com/questions/327722
复制相似问题