场景:
提示:这里简述项目相关背景:

CMake 报错 CMake ERROR Failed to run MSBuild command: MSBuild.exe。如下图所示:

问题描述
提示:这里描述项目中遇到的问题:

①cmake报错

VS版本选择问题,如果是VS 2017,那就选择visual studio 15 2017,看后面不是看前面。注意,默认是win32,记得改一下选X64

② Failed to run MSBuild command: MSBuild.exe

解决办法:

(1)首先看第一行,SDK version 后面有没有显示版本号,没有显示的话可能是VS没有SDK。去VS安装就好了,打开Visual Studio Installer,点击修改,找到安装就行。
(2)建议把VS里,windows那三个都装了。

(3)在环境变量path中添加:C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin(具体路径看自己电脑里的路径,大家的不一定一样。

这里我遇到一个问题,win11系统,我不小心把之前的path路径覆盖了,然后就变成了单行,分号分隔的形式。

要改回多值的情况只需要把C:\Windows\System32放在第一个就可以。

(4)如果上述都没有解决这个问题,用管理员权限运行cmake-gui(反正我是这样解决的)。

————————————————
原文链接:https://blog.csdn.net/qjtx_08051005/article/details/123746899

Failed to run MSBuild command 错误问题解决的更多相关文章

  1. [转载]解决"command 'gcc' failed with exit status 1"错误问题

    转自:https://blog.csdn.net/learn_tech/article/details/80066583 解决"command 'gcc' failed with exit ...

  2. adb错误:Failed to execute android command 'adb devices'.

    好吧,我是用的phonegap3.0开发的,很简单,安装的时候一句phonegap run android –device就可以了(-device参数非必要,我是为了不跑模拟器,加上此参数限制只跑到设 ...

  3. command 'x86_64-linux-gnu-gcc' failed with exit status 1错误及解决方案

    Ubuntu16.04安装Scrapy(pip install Scrapy)时提示错误如下: Failed building wheel for cryptography Running setup ...

  4. 运行代码时报linker command failed with exit code 1 错误

    一个c语言项目,在.h文件中原来只有一些方法的声明,后来我加入了一些变量声明后,编译的时候报错: 运行代码时报linker command failed with exit code 1 错误 怎么回 ...

  5. [转]How do I run msbuild from the command line using Windows SDK 7.1?

    本文转自:http://stackoverflow.com/questions/6319274/how-do-i-run-msbuild-from-the-command-line-using-win ...

  6. 【我的Android进阶之旅】解决SVN Cleanup错误: Failed to run the WC DB work queue associated with

    错误描述 在Android Studio中点击VCS向下箭头使用SVN Update功能更新代码的时候,报错如下所示: 错误描述信息: Error:svn: E155037: Previous ope ...

  7. 下载接口时出现:Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'D:\python\demo\venv\Scripts\...的错误

    下载接口时出现:Try to run this command from the system terminal. Make sure that you use the correct version ...

  8. 解决SVN Cleanup错误: Failed to run the WC DB work queue associated with

    [内容来源自https://www.cnblogs.com/ANCAN-RAY/p/8961832.html] 在svn本地目录更新文件夹时,更新失败. 然后svn提示我,让我cleanup一下,于是 ...

  9. 使用otl,报错:mysql Commands out of sync; you can't run this command now

    1.代码如下: void TestCache(otl_connect& otlConn) { try { ] = {}; sprintf(sql,"call test1(1)&quo ...

  10. python mysql 2014 Commands out of sync; you can't run this command now

    这个问题出现再 mysql和c  的api. 简单的解决方法是不使用api直接把整个连接和命令传过去. 例如,cmd = 'mysql -h 192.168.32.210 -P 3316 -u bfd ...

随机推荐

  1. Tarjan缩点题单 刷题题解

    Tarjan缩点可以将一个图的每个强连通分量缩成一个点,然后构建新图,该图就会变成一个有向无环图.变成有向无环图之后就能结合最短路,拓扑......解决相应题目 洛谷题单分享: https://www ...

  2. python多线程应用-批量下载视频课程(宠医堂)

    #!/usr/bin/env python # -*- coding: UTF-8 -*- ''' @Name: cyt_record_download @IDE:PyCharm @Author:qt ...

  3. A星、Floyod、Bellman-Ford

    A 星算法 A 星和 Dijkstra 算法唯一区别在于堆中排序的依据.distance 数组仍然保存实际代价,预估代价只影响堆的弹出顺序. Dijkstra 根据源点到当前点的实际代价进行排序. A ...

  4. PostgresSQL创建一个只读用户

    create user readonlyuser with password 'R3333333341'; grant select on all tables in schema public to ...

  5. BootStrap5应用时tooltips的添加

    BootStrap5应用时tooltips的添加 官方示例 <button type="button" class="btn btn-secondary" ...

  6. jsp页面访问数据库根据数据情况,定时弹出提醒

    需求:根据数据库情况,在页面定时弹出相应的消息 实现: 1. 展示DIV设置 <script language="javascript" type="text/ja ...

  7. CSP-S模拟赛20241004

    A 你考虑 可以把这个数组当中的每个数表示成另一种形式:\(a_i = k_i\times x+b\)(其中\(x\)是模数,\(b\)为余数). 对于求两个数是否对于某个余数同余,显然你要判断他们两 ...

  8. Selenium 自动化测试工具

    1 介绍 Selenium是浏览器的自动化测试工具,使用它可以控制浏览器各种点击等操作. 2 环境搭建 先安装Chrome等浏览器,然后安装对应版本的ChromeDriver驱动程序,然后pip安装S ...

  9. CUDA 编程学习 (5)——内存访问性能

    1. DRAM 带宽 1.1 DRAM 核心阵列结构 每个 DRAM 核心阵列约有 \(16M\) bits 每个 bits 存储在由一个晶体管组成的微小电容器中 超小型(8x2-bit)DRAM 内 ...

  10. 轻松上云怎么操作?IoT_CLOUD之中移OneNET

    ​  最近来了很多新朋友,也经常被问:可以多讲些云平台的操作吗?当然可以!文末留言你想要了解的云平台,优先安排~ 接下来,本文将以Air780E+LuatOS作为示例,教你使用合宙IoT_CLOUD连 ...