• VS2015报错:error MSB8020和MSB8036的解决方案


    VS2015编译报错:error MSB8020

    提示信息:error 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”.

    原因分析

    根据报错信息很清楚地看到就是构建工具的平台版本不匹配,即我拿的是别人在VS2017的工程,但是我本地是VS2015的工程,这两个工程配置差异导致的构建失败。

    解决方案

    打开VS2015项目-项目-属性-常规-平台工具集,修改成你本地对应的就可以,以VS2015为例,应该是VS2015(v140),截图如下:
    在这里插入图片描述
    修改完成后还出现另一个报错:error MSB8036: The Windows SDK version 10.0.17763.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting “Retarget solution”.

    原因分析

    与上面分析一致,也是平台不匹配导致。

    解决方案

    1. 重新装一个匹配版本的VS,例如工程原先是VS2017的,那就安装对应的VS;
    2. 修改当前项目的配置属性:项目-属性-常规-目标平台版本,改成本地对应的就行,以我本地为例,我是用VS2015,所以我改成了8.1版本(VS2017应该是10.1),截图如下:
      在这里插入图片描述

    结果展示

    编译成功,正常生成lib文件:
    在这里插入图片描述

  • 相关阅读:
    论文阅读:HarDNet: A Low Memory Traffic Network
    人工神经网络用什么软件,神经网络能用来做什么
    提高生存能力的7个关键技巧!
    【性能测试】初识 Jmeter 中的 BeanShell
    Java 常用API的运用,效率及技巧
    安利一波C2工具
    代码随想录训练营day55
    MySQL数据库管理基操
    Cookie注入和X-Forwarded-For注入
    https跟http有什么区别?
  • 原文地址:https://blog.csdn.net/sv2008337/article/details/136390683