MSbuild is not recognized as internal or external command — Solved
Jun 25, 2022
We have to add path of MS build in Environment variables.
- Navigate to PC Properties.
2. Click on Advanced System Settings
3. Navigate to Advance Tab and open the Environment Variables.
4. Open the Path variable in System variables in edit mode.
5. Add the MS Build Path in it and save.
For VS2015 the path is:
%ProgramFiles(x86)%\MSBuild\14.0\Bin
For VS2017 the path is:
%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin
For VS2019 the path is:
%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin
After this re-open CMD of VS code terminal and run msbuild.