找不到`msbuild`命令,但是`msbuild.exe`可以正常工作 [英] `msbuild` command not found, but `msbuild.exe` works fine
本文介绍了找不到`msbuild`命令,但是`msbuild.exe`可以正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我以适用于Windows的Git 中分发的方式运行MSys/Bash.我将文件夹C:\Windows\Microsoft.NET\Framework\v4.0.30319
添加到了我的路径,所以我可以运行msbuild
,但是它不起作用
I run MSys/Bash as distributed in Git for Windows. I added the folder C:\Windows\Microsoft.NET\Framework\v4.0.30319
to my path, so I could run msbuild
but it doesn't work
$ msbuild
C:\Program Files (x86)\Git\bin\sh.exe: msbuild: command not found
但msbuild.exe
确实:
$ msbuild.exe
Microsoft (R) Build Engine version 4.0.30319.17929
但是命令explorer
可以很好地解决.发生了什么事?
Yet the command explorer
resolves fine. What's going on?
推荐答案
这是MSys中的一个错误,该错误由文件夹和文件(减去扩展名)共享相同的名称.在这种情况下:
It's a bug in MSys where the same name is shared by a folder and a file (minus the extension). In this case:
- 文件
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
- 文件夹
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild
- File
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
- Folder
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild
您必须通过编写msbuild.exe
这篇关于找不到`msbuild`命令,但是`msbuild.exe`可以正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文