首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Visual 2015 -命令行重定向解决方案

Visual 2015 -命令行重定向解决方案
EN

Stack Overflow用户
提问于 2015-10-27 23:12:16
回答 1查看 14.8K关注 0票数 24

尝试使用Visual 2015从命令行构建一个旧项目(VS2010)。但是,我明白了:

C:\Program (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(55,5):错误MSB8020:无法找到Visual 2010的构建工具(Platform = 'v100')。若要使用v100生成工具进行生成,请安装VisualStudio2010BuildTools。或者,您可以通过选择“项目”菜单或右键单击解决方案,然后选择“重定向获取解决方案”,升级到当前的Visual工具。

有人知道如何从命令行“重定向解决方案”吗?

EN

Stack Overflow用户

回答已采纳

发布于 2015-10-28 08:29:59

C:\Program (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(55,5):错误MSB8020:无法找到Visual 2010的构建工具(Platform = 'v100')。

显然,您没有安装Visual Studio 2010 (Platform Toolset = 'v100')工具集,您的旧项目(Visual 2010)引用它。

您的选择:

  1. 如果在Visual 2015中打开vcxproj文件,Go to project properties -> General settings.将看到有一个PlatformToolset属性。对于Visual 2015,它是v140;对于Visual 2010,它是v100。 将平台工具集更改为Visual Studio 2015 (Platform Toolset = 'v140')。然后,您也可以通过命令行和VS编辑器进行构建(请注意,升级解决方案并不能保证解决方案能够很好地构建)。
  2. 可以在不更改vcxproj文件的情况下设置PlatformToolset。可以用PlatformToolset覆盖/p:PlatformToolset=v140属性以更改工具集。 例如msbuild myProject.vcxproj /p:PlatformToolset=v140

如果您不知道Platform Toolset及其值:

代码语言:javascript
运行
复制
Visual Studio .NET 2002 (Platform Toolset = 'v70')
Visual Studio .NET 2003 (Platform Toolset = 'v71')
Visual Studio 2005      (Platform Toolset = 'v80')
Visual Studio 2008      (Platform Toolset = 'v90')
Visual Studio 2010      (Platform Toolset = 'v100')
Visual Studio 2012      (Platform Toolset = 'v110')
Visual Studio 2013      (Platform Toolset = 'v120')
Visual Studio 2015      (Platform Toolset = 'v140')
Visual Studio 2017      (Platform Toolset = 'v141')
Visual Studio 2019      (Platform Toolset = 'v142')
...
票数 37
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33380128

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档