在TeamCity服务器或Team Foundation Build Service上,需要为C ++项目/ VS 2013安装什么? [英] What do I need to install for C++ project / VS 2013 on TeamCity server or Team Foundation Build Service?

查看:626
本文介绍了在TeamCity服务器或Team Foundation Build Service上,需要为C ++项目/ VS 2013安装什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在TC 8.0.6(build 27767)的Visual Studio 2013解决方案中构建一个C ++项目。

I am attempting to build a C++ project in a Visual Studio 2013 solution on TC 8.0.6 (build 27767).

我已经在服务器上直接安装了最新的MSBuildMicrosoft Build Tools 2013​​(通常作为VS 2013安装的一部分安装)。

I have installed the latest MSBuild "Microsoft Build Tools 2013" stuff (which is normally installed as part of VS 2013 install) directly on the server.

但我收到以下错误:

[17:05:23]VCTargetsPath is c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\
[17:05:23]PlatformToolset is v120
[17:05:23]VCMessage
[17:05:23]c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32
Microsoft.Cpp.Win32.Targets(512, 5): error MSB8008: Specified platform toolset (v120) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected.
[17:05:23]Project MyCppProject\smCpp.vcxproj failed

因为我可以看到我有我需要的一切,我已经尝试了各种各样的hack设置PlatformToolset到v110等,但这不工作。

As far as I can see I have everything I need and I have tried various hacks to set the PlatformToolset to v110 etc., but that doesn't work either.

在这个阶段,我想验证我需要在构建服务器上安装什么。

At this stage I would like to verify exactly what I need to install on the build server. Can someone clarify if I need anything extra please?

非常感谢

Brian

推荐答案

最后,你需要设置正确的路径到MSBuild。与VS 2013,构建工具成为VS而不是.NET的一部分,使其版本12.0而不是4.0。此实例中的默认路径为:

Ultimately you need to set the correct path to MSBuild. With VS 2013, build tooling became part of VS rather than .NET, making it version 12.0 instead of 4.0. The default path in this instance is:

C:\Program Files(x86)\MSBuild\12.0\bin

"C:\Program Files (x86)\MSBuild\12.0\bin"

如果团队基础构建破坏,那么可能是因为TF服务器不在版本2013.为了解决这个问题,你需要让自己的构建定义使用的构建模板的副本(假设你的版本为> = 2010和< 2013),并指向正确的工具文件夹。构建模板位于以下源路径中:

If the team foundation build is broken then it's likely because the TF server is not on version 2013. To fix the problem you need to make yourself a copy of the build template the build definition uses (assuming your version is >= 2010 and < 2013) and point to the correct tooling folder. The build templates are located in the following source path:

$ / YourTeamProjectName / BuildProcessTemplates

$/YourTeamProjectName/BuildProcessTemplates

如果可以编辑在Visual Studio中的模板中打开Workflow Foundation设计界面。在这里找到运行MSBuild for Project 任务(请注意,在默认模板中有多个,但我已经显示了要查找的图片),并将工具路径属性更改为上述路径。

If you can edit the template in Visual Studio you open the Workflow Foundation design surface. In there find the Run MSBuild for Project tasks (note in the default template there is more than one, but I've shown a pic of what to look for) and change the tool path property to the above path.

一旦您创建了模板,您需要更改您的构建定义以使用新模板。

Once you created the template you need to change your build definition to use the new template.

对于TeamCity,您需要设置MSBuild ToolsVersion到版本12.0在您的构建步骤。我不知道什么版本的TC开始支持版本12。

For TeamCity you need to set the MSBuild ToolsVersion to version 12.0 in your build step. I'm not sure what version of TC started support for version 12.

这篇关于在TeamCity服务器或Team Foundation Build Service上,需要为C ++项目/ VS 2013安装什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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