`msbuild` command not found, but `msbuild.exe` works fine

前端 未结 2 1984
野的像风
野的像风 2020-12-19 06:59

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

相关标签:
2条回答
  • 2020-12-19 07:28

    It's a bug in MSys where the same name is shared by a folder and a file (minus the extension). In this case:

    • File C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
    • Folder C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild

    You'll have to workaround by writing msbuild.exe

    0 讨论(0)
  • 2020-12-19 07:29

    If msbuild.exe cannot be found, it needs to be configured.

    Open a command prompt and run the file vsvars32.bat located in your Visual Studio Common7/Tools folder..

    i.e C:\Program Files x86\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat

    This will correctly setup all the neccessary variables for msbuild.exe to be found.

    0 讨论(0)
提交回复
热议问题