意外属性";“建筑并行”;关于元素<;msbuild>;
我正在尝试对MsBuild使用BuildInParallel选项 我有一个NAnt&NAntContrib脚本,例如意外属性";“建筑并行”;关于元素<;msbuild>;,msbuild,nant,nantcontrib,Msbuild,Nant,Nantcontrib,我正在尝试对MsBuild使用BuildInParallel选项 我有一个NAnt&NAntContrib脚本,例如 <project xmlns="http://nant.sf.net/release/0.90/nant.xsd" name="Css Manager Solution Build" ToolsVersion="3.5" default="deploy"> <target name="clean" description="Delete all
<project xmlns="http://nant.sf.net/release/0.90/nant.xsd" name="Css Manager Solution Build" ToolsVersion="3.5" default="deploy">
<target name="clean" description="Delete all previously compiled binaries.">
<delete>
<fileset>
<include name="**/bin/**" />
<include name="**/obj/**" />
<include name="**/*.suo" />
<include name="**/*.user" />
</fileset>
</delete>
</target>
<target name="deploy" description="Build and deploy all targets.">
<msbuild project="CssManager.sln" BuildInParallel="true">
<property name="Configuration" value="${configuration}"/>
<property name="OutDir" value="${bin.output.dir}"/>
</msbuild>
</target>
</project>
但我得到了这个错误信息:
Unexpected attribute "BuildInParallel" on element <msbuild>
元素上的意外属性“BuildInParallel”
请告知?nant contrib的
MSBuild
任务没有BuildInParallel
属性。您必须使用Maxcpucount
命令行参数
<target name="deploy" description="Build and deploy all targets.">
<msbuild project="CssManager.sln" BuildInParallel="true">
<property name="Configuration" value="${configuration}"/>
<property name="OutDir" value="${bin.output.dir}"/>
<arg value="/maxcpucount:${environment::get-variable('NUMBER_OF_PROCESSORS')}"/>
</msbuild>
</target>
谢谢,但我收到这样一条消息:不支持嵌套的构建元素“args”。我正在使用NAntContrib版本0.85.2479谢谢-我也很糟糕-我检查了文档,但完全没有看到。作为补充说明,您可以通过添加以下内容获得最大值:${environment::get variable('U处理器的数量')}