MSBuild path / environment variable confusion
Not sure why MSBuild path is not in a standard location and most importantly, why doesn't it get added automatically to env var list when installing Visual Studio 2019. Here is some proof where people are grappling for MSBuild.exe location. My assumption was it should have been added automatically when I installed my Visual Studio 2019 but unsure why not.
I too wanted to run MSBuild from command prompt and when I searched my machine, I got a lot of temporary locations and MSBuild wasn't globally accessible:
So, I decided to install MSBuild tools from here for VS 2019:
Tool Installed locally:
But, wanted to access globally so, in my case, the MSBuild.exe was located here -
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin
So, added the same to environment variables:
Now, MSBuild was detectable globally:
So, better cross check your MSBuild.exe location and add the correct path to env var list.
P.S. I later found a MSBuild.exe under C:\Windows\Microsoft.NET\Framework\v4.0.30319 but size totally different from VS 2019 MSBuild.exe I downloaded. So, better to be aware of various install locations!
Comments
Post a Comment