代码之家  ›  专栏  ›  技术社区  ›  Robs Nealvs

元素<msbuild>

  •  1
  • Robs Nealvs  · 技术社区  · 14 年前

    我有一个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 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>
    

    1 回复  |  直到 14 年前
        1
  •  2
  •   Julien Hoarau    14 年前

    这个 MSBuild nant contrib的任务没有 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>