- You get an error – “msbuild is not recognized as internal or external command” while executing msbuild command from your regular command prompt
- You get an error – “msbuild is not recognized as internal or external command” while executing msbuild command from Visual studio code.
Step 1 – Go to properties of current machine This PC.
Step 2 – click on Advanced system settings
Step 3 – Click Environment Variable
Step 4 – Edit Path Value
Step 5 – Set the path
For Visual Studio 2019 use below value.
HTML%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin
For Visual Studio 2017 use below value.
HTML%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin
Click in OK in all Widows and Done.
Step 6 – Reopen Command Prompt or Visual Studio code and open terminal