Visual studio(2017)构建工具150

Los*_*nos 2 autohotkey visual-c++

当我尝试编译一些C++代码时,我得到了错误

Code:   
    MSB8020
Description:    
    The build tools for v150 (Platform Toolset = 'v150') cannot be found. 
    To build using the v150 build tools, please install v150 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".
Run Code Online (Sandbox Code Playgroud)

我不能选择"Retarget解决方案",因为没有这样的.
我已经打开了Visual Studio安装程序,但最新的工具集有141个.

如何降级构建工具要求或如何"重新定位解决方案"?

TL; DR

我通过尝试编译Autohotkey_L来进入这种情况.通过安装HyperV虚拟机并下载微软提供的开发机器,我完全干净了.它已包含Visual Studio 2017社区版.它不能变得更干净或更新.

Sta*_*n E 7

您默认使用带有141工具集的Visual Studio 2017(另外还可以安装v140).v150可能会在未来的版本中提供,这就是为什么你仍然可以在工具集中选择它.

问题是当未选择工具集时,它会尝试使用最高版本的Visual Studio版本,而不考虑是否安装了工具集.由于150尚不可用,您无法使用它.

为了解决这个问题,右键单击项目(不是解决方案!),你应该有2个例子,去属性 - >选择配置 - 所有配置 - >常规 - >平台工具集 - >选择v141(你应该有)默认情况下) - >好的.使用您拥有的第二个项目执行它.

这是它的样子:

visual studio配置截图