【问题标题】:MSB4064: The "BuildInParallel" parameter is not supported by the "MSBuild" taskMSB4064:“MSBuild”任务不支持“BuildInParallel”参数
【发布时间】:2011-10-25 09:38:22
【问题描述】:

我有一个 MSBuild 构建文件,它可以在我的本地开发盒上正确运行,但在我们的 CI 构建盒上运行失败。

失败的构建目标如下:

<Target Name="Clean">
  <MSBuild Projects="Solution.sln" Targets="Clean" BuildInParallel="True"/>
</Target>

构建框上的错误是这样的:

"E:\TRUNK\build\Bamboo.build" (Build target) (1) ->
25-Oct-2011 10:22:51    (Clean target) -> 
25-Oct-2011 10:22:51      E:\TRUNK\build\build.build(19,55): error MSB4064: The "BuildInParallel" parameter is not supported by the "MSBuild" task. Verify the parameter exists on the task, and it is a settable public instance property.
25-Oct-2011 10:22:51      E:\TRUNK\build\build.build(19,5): error MSB4063: The "MSBuild" task could not be initialized with its input parameters. 

两台机器都报告有 MSBuild 版本 4.0.30319.1

Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.237]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

4.0.30319.1

我的本​​地机器是 Windows 7 x64,安装了 .Net Framework 4 和 Windows SDK 7.1,有 8 个内核。

CI 盒是 Windows Server 2008 x64,还安装了 .Net Framework 4 和 Windows SDK 7.1,具有 8 个内核。

任何想法可能导致此问题的差异是什么?

【问题讨论】:

    标签: msbuild continuous-integration


    【解决方案1】:

    在您的 MSBuild 项目根标记中检查您的 ToolsVersion。值应为“3.5”或“4.0”,因为从 v3.5 开始支持 BuildInParallel。

        <Project ToolsVersion="3.5" .../>
    

    【讨论】:

      猜你喜欢
      • 2015-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-11
      • 2019-08-20
      • 1970-01-01
      • 1970-01-01
      • 2020-05-25
      相关资源
      最近更新 更多