找不到`msbuild`命令,但是`msbuild.exe`可以正常工作 [英] `msbuild` command not found, but `msbuild.exe` works fine

查看:529
本文介绍了找不到`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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆