代码之家  ›  专栏  ›  技术社区  ›  LosManos

Visual Studio(2017)生成工具150

  •  2
  • LosManos  · 技术社区  · 7 年前

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

    如何降低生成工具要求或如何“重定目标解决方案”?

    DR

    我是通过试图编译 Autohotkey_L . 我安装了一个hyperv虚拟机并下载了微软提供的dev机器,彻底清除了这一切。它已经包含了一个visual studio 2017社区版。再干净也没有比这更新的了。

    1 回复  |  直到 7 年前
        1
  •  7
  •   Stan E    7 年前

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

    问题是,如果未选择“工具集”,它将尝试为您的Visual Studio版本使用最高版本,而不查看是否安装了该工具集。由于150还不可用,您不能使用它。

    为了修复它,右键单击项目(不是解决方案!),您应该有2个示例,go properties->select configuration all configurations->general->platform toolset->select v141(默认情况下应该有)->ok。用你的第二个项目来完成它。

    下面是它的样子:

    visual studio configuration screenshot