Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

bash

msysgit

msys

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

Yet msbuild.exe does:

$ msbuild.exe
Microsoft (R) Build Engine version 4.0.30319.17929

Yet the command explorer resolves fine. What's going on?

like image 816
Colonel Panic Avatar asked Dec 11 '12 11:12

Colonel Panic


1 Answers

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

like image 56
Colonel Panic Avatar answered Sep 19 '22 18:09

Colonel Panic