kei*_*thm 15 msbuild nant nantcontrib
看起来有(至少)两个选项可以让nant使用csproj文件:使用NAntContrib的任务或直接使用msbuild.exe(例如,codecampserver).我是否正确阅读,如果是这样,使用msbuild.exe优于NAntContrib任务有什么好处?
Bab*_*fas 26
NAntContrib采用.NET Framework V2.0.如果要使用.NET 3.5,则需要直接调用MsBuild.exe.升级到新版本的.NET时,只需修改MSBuildPath属性即可.
这是一个例子:
<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>
Run Code Online (Sandbox Code Playgroud)
MSBuildPath不同版本的.NET 的值是
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\MSBuild.exeC:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exeC:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe对于32位版本,请更改Framework64为Framework
更新
跟随某些注释,该value属性用于没有空格的参数.line用于需要由于空格而分隔的参数.否则,应用程序将使用空格作为输入的结尾.
| 归档时间: |
|
| 查看次数: |
17858 次 |
| 最近记录: |