我已将我的应用程序从 .NET 1.1 转换为 .NET 3.5,不幸的是 NAnt 的标签不支持 .NET 3.5。所以我尝试使用标签直接启动msbuild。
这是我对 .NET 1.1 的了解:
<solution solutionfile="MyApp.sln"
configuration="ServerDebug" outputdir="MyApp\bin\ServerDebug">
<assemblyfolders>
<include name="Dependencies\Libs\bin\ServerDebug"/>
</assemblyfolders>
</solution>
我把它转换为
<exec program="msbuild">
<arg value="MyApp.sln /p:Configuration=ServerDebug;OutDir=bin\ServerDebug\" />
</exec>
所以一切都工作正常,除了我不知道如何复制真正方便的标签,这给编译器一个关于在哪里寻找依赖项的提示。
我应该将什么传递给 msbuild 来复制功能?
我认为可以通过以下两种选择之一来完成。要么通过使用附加库路径 or 程序集搜索路径,其中描述了on MSDN.
像下面这样:
<exec program="msbuild.exe">
<arg line="/p:Configuration=ServerDebug"/>
<arg line="/p:OutDir=bin\ServerDebug\" />
<arg line="/p:AssemblySearchPaths=Dependencies\Libs\bin\ServerDebug" />
<arg line="MyApp.sln" />
</exec>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)