C++ 如何在 VS2015 中重新定位 VS2017 解决方案?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/45672243/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 15:39:41  来源:igfitidea点击:

How do I retarget a VS2017 solution in VS2015?

c++visual-studio-2015

提问by Niklas Utterback

MSB8020 The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".

MSB8020 找不到 v141 的构建工具(平台工具集 = 'v141')。要使用 v141 构建工具进行构建,请安装 v141 构建工具。或者,您可以通过选择“项目”菜单或右键单击解决方案,然后选择“重定向解决方案”来升级到当前的 Visual Studio 工具。

I have been working on a project in VS2017 at home, but the school computer uses VS2015. How do I retarget my solution to an older version?

一直在家里用VS2017做一个项目,但是学校电脑用的是VS2015。如何将我的解决方案重新定位到旧版本?

I have checked the Project menu and right-clicked on both the solution and the separate projects in the solution explorer, but there is no 'Retarget solution' option.

我检查了项目菜单并右键单击解决方案资源管理器中的解决方案和单独的项目,但没有“重新定位解决方案”选项。

回答by Niklas Utterback

  1. Right click on the project in the Solution Explorer
  2. Click on "Properties"
  3. Navigate to "Configuration properties"
  4. Click on the "General" option below "Configuration properties"
  5. Change "Platform toolset" to Visual Studio 2015 (v140)
  1. 右键单击解决方案资源管理器中的项目
  2. 点击“属性
  3. 导航到“配置属性
  4. 单击“配置属性”下方的“常规”选项
  5. 将“平台工具集”更改为Visual Studio 2015 (v140)

回答by Singha

Open Visual Studio Solution file in notepad or any editor and then update the VisualStudioVersion to 14.0.25420.1 and save the solution. Also check the MinimumVisualStudioVersion.

在记事本或任何编辑器中打开 Visual Studio 解决方案文件,然后将 VisualStudioVersion 更新为 14.0.25420.1 并保存解决方案。还要检查 MinimumVisualStudioVersion。