Failed to run MSBuild command 错误问题解决
场景:
提示:这里简述项目相关背景:
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 错误问题解决的更多相关文章
- [转载]解决"command 'gcc' failed with exit status 1"错误问题
转自:https://blog.csdn.net/learn_tech/article/details/80066583 解决"command 'gcc' failed with exit ...
- adb错误:Failed to execute android command 'adb devices'.
好吧,我是用的phonegap3.0开发的,很简单,安装的时候一句phonegap run android –device就可以了(-device参数非必要,我是为了不跑模拟器,加上此参数限制只跑到设 ...
- command 'x86_64-linux-gnu-gcc' failed with exit status 1错误及解决方案
Ubuntu16.04安装Scrapy(pip install Scrapy)时提示错误如下: Failed building wheel for cryptography Running setup ...
- 运行代码时报linker command failed with exit code 1 错误
一个c语言项目,在.h文件中原来只有一些方法的声明,后来我加入了一些变量声明后,编译的时候报错: 运行代码时报linker command failed with exit code 1 错误 怎么回 ...
- [转]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 ...
- 【我的Android进阶之旅】解决SVN Cleanup错误: Failed to run the WC DB work queue associated with
错误描述 在Android Studio中点击VCS向下箭头使用SVN Update功能更新代码的时候,报错如下所示: 错误描述信息: Error:svn: E155037: Previous ope ...
- 下载接口时出现: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 ...
- 解决SVN Cleanup错误: Failed to run the WC DB work queue associated with
[内容来源自https://www.cnblogs.com/ANCAN-RAY/p/8961832.html] 在svn本地目录更新文件夹时,更新失败. 然后svn提示我,让我cleanup一下,于是 ...
- 使用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 ...
- 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 ...
随机推荐
- Machine Learning Week_1 Welcome
目录 0 Welcome 0.1 Video: Welcome to Machine Learning! Transcript unfamiliar words 0.2 Reading: Machin ...
- 字符串、列表、元组、字典(python)
文章目录 1.python字符串 1.1 python访问字符串中的值 1.2Python 字符串连接 1.3Python字符串运算符 2.python列表 2.1访问列表中的值 2.2更新列表 2. ...
- 血泪史: k8s Initial timeout of 40s passed.
背景: k8s不管是 kubeadm init 和join都会报错 kubelet-start] Writing kubelet configuration to file "/var/li ...
- 基于Java+SpringBoot+Mysql实现的快递柜寄取快递系统功能实现二
一.前言介绍: 1.1 项目摘要 随着电子商务的迅猛发展和城市化进程的加快,快递业务量呈现出爆炸式增长的趋势.传统的快递寄取方式,如人工配送和定点领取,已经无法满足现代社会的快速.便捷需求.这些问题不 ...
- 不同团队如何实现登录系统 (just for fun)
某一天 ceo 需要一个登录系统,找了开发团队 控制狂团队 领导点了卡布奇诺,打开了自己轻薄的 mac book, 点开 word 文档, 开始编写: 1. 项目背景 2. 名词解析 3. 数据表设计 ...
- html代码新手教学
HTML 是超文本标记语言(HyperText Markup Language)的缩写,是用来描述网页结构的标记语言.在这篇教学中,我们将介绍一些 HTML 基础知识,帮助新手快速学习并掌握如何编写简 ...
- 使用 ASM 实现 Java 语言的“多重继承”
问题的提出 在大部分情况下,需要多重继承往往意味着糟糕的设计.但在处理一些遗留项目的时候,多重继承可能是我们能做出的选择中代价最小的.由于 Java 语言本身不支持多重继承,这常常会给我们带来麻烦,最 ...
- python之DataClass
Python 在版本 3.7 (PEP 557) 中引入了dataclass.dataclass允许你用更少的代码和更多的开箱即用功能来定义类. 下面定义了一个具有两个实例属性 name 和 age ...
- 轻量数据库管理工具之adminer
github: https://github.com/vrana/adminer 官方文档:https://www.adminer.org/#download Supports: MySQL, Mar ...
- Redis可视化管理工具之Redislive
RedisLive是一款用Python编写基于WEB的Redis图形监控工具,也是一款实时监控Redis数据的开源软件,以WEB的形式展现出redis中的key的情况,实例数据等信息. RedisLi ...