是否有可能有一个解决方案,不同的平台工具集的项目? (的MSBuild) [英] Is it possible to have projects with different Platform Toolset in a solution? (MSBuild)

查看:1140
本文介绍了是否有可能有一个解决方案,不同的平台工具集的项目? (的MSBuild)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要建立与TFS的解决方案。 C#项目和一些C ++项目升级到.NET Framework 4.6和平台工具集V140。但一些第三方C ++项目不能升级的(他们在V110)。 MSBuild的是不能够使用正确的工具集版本的项目。它返回这个错误:

I have a solution that needs to build with TFS. C# projects and some of C++ projects are upgraded to .Net Framework 4.6 and Platform Toolset v140. but some of the third party C++ projects can't upgrade (They are in V110). MSBuild is not able to use the appropriate toolset version for projects. It returns this error:

C:\\ Program Files文件(x86)的\\的MSBuild \\ Microsoft.Cpp \\ V4.0 \\ V110 \\ Microsoft.Cpp.Platform.targets(44):该版本工具V140(平台工具集= V140)无法找到。要建立使用V140构建工具,可以单击项目菜单或右键单击该解决方案,然后选择更新VC ++项目......。 V140安装使用V140构建工具来构建。

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets (44): The builds tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v140 to build using the v140 build tools.

有没有办法得到这个工作?这是可能的MSBuild建立具有不同的平台工具集项目的解决方案?

Is there any way to get this to work? It is possible for MSBuild to build a solution which has projects with different Platform Toolsets?

感谢您,
阿拉什

Thank you, Arash

推荐答案

我的同事解决问题的菲尔。基本上所有你需要做的是改变的MSBuild刀具路径属性指向向右的MSBuild版本。由于的MSBuild的每个版本支持早期版本的MSBuild的最高使用的版本,你应该指向。

The problem solved by my Colleague Phil. Basically All you have to do is to change the MSBuild ToolPath property to point to right MSBuild version. As each version of MSBuild supports earlier versions, the highest used version of MSBuild should you point to.

因此​​,在Visual Studio中打开Build过程模板,并导航到Microsoft.TeamFoundation.Build.Workflow.Activities.MSBuild。要到那里你应该去以下路径:

So open the Build Process Template in Visual Studio and navigate to Microsoft.TeamFoundation.Build.Workflow.Activities.MSBuild. To get to there you should go to the following path:

尝试编译,测试和准... - >序列 - >编译,测试和准... - >尝试编译和测试 - >编译和测试 - >对于每个配置 - >和编译测试... - >如果BuildSettings.HasProjectsToBuild - >为每个项目在BuildSettings ... - >编制项目和复制 - >尝试编译工程 - >编译项目

Try Compile, Test and Associate ... -> Sequence -> Compile, Test, and Associate ... -> Try Compile and Test -> Compile and Test -> For Each Configuration in ... -> Compile and Test For ... -> If BuildSettings.HasProjectsToBuild -> For Each Project in BuildSettings... -> Compile Project and Copy -> Try to Compile the Project -> Compile the Project

现在运行MSBuils的项目,选择属性单击鼠标右键。在这里,你有一个属性刀具路径,你可以指定的MSBuild地址(在我的情况下,它是C:\\ Program Files文件(x86)的\\的MSBuild \\ 14.0 \\ BIN)。

Now right-click on "Run MSBuils for Projects" and select properties. Here you have a property "ToolPath" that you can specify the MSBuild address (in my case it is "C:\Program Files (x86)\MSBuild\14.0\Bin").

这应该解决这个问题。

干杯,

阿拉什

这篇关于是否有可能有一个解决方案,不同的平台工具集的项目? (的MSBuild)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆