MSB4064:“并行构建” “MSBuild”不支持该参数任务

发布于 2024-12-12 04:54:02 字数 1193 浏览 0 评论 0原文

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

您知道导致此问题的差异可能是什么吗?

I have a MSBuild build file that runs correctly on my local dev box but fails on our CI build box.

The failing build target is as follows:

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

And the error on the build box is this:

"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. 

Both machines report having MSBuild version 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

My local box is Windows 7 x64 and has .Net Framework 4 and Windows SDK 7.1 installed and has 8 cores.

The CI box is Windows Server 2008 x64 and also has .Net Framework 4 and Windows SDK 7.1 installed and has 8 cores.

Any ideas what the difference might be that is causing this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

|煩躁 2024-12-19 04:54:02

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

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

Check your ToolsVersion in your MSBuild project root tag. Value should be "3.5" or "4.0", because BuildInParallel is supported from v3.5.

    <Project ToolsVersion="3.5" .../>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文