MSB4064:“MSBuild”任务不支持“BuildInParallel”参数

时间:2011-10-25 09:38:22

标签: msbuild continuous-integration

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

任何想法可能导致这个问题的区别是什么?

1 个答案:

答案 0 :(得分:6)

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

    <Project ToolsVersion="3.5" .../>
相关问题