Visual studio(2017)构建工具150

时间:2018-06-07 20:55:36

标签: visual-c++ autohotkey

当我尝试编译一些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".

我不能选择“重新定位解决方案”,因为没有这样的 我打开了Visual Studio安装程序,但最新的工具集有141个。

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

TL; DR

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

1 个答案:

答案 0 :(得分:7)

默认情况下,您使用的Visual Studio 2017具有141个工具集(还可以另外安装v140)。 v150可能会在将来的版本中提供,这就是为什么您仍然可以在工具集中选择它的原因。

问题是当未选择工具集时,它将尝试使用Visual Studio版本的最高版本,而无需查看是否已安装工具集。由于150尚不可用,因此您无法使用它。

为了修复它,右键单击项目(不是解决方案!),您的示例应为2,然后转到“属性”->“选择配置-所有配置->常规->平台工具集->选择v141(如您应该默认使用它)->确定。同时执行第二个项目。

这是它的样子:

visual studio configuration screenshot