Microsoft Tips & Tricks Visual Studio Windows

How To Resolve MSBuild Is Not Recognized As Internal Or External Command Error

In this article you will learn how to resolve How To Resolve MSBuild Is Not Recognized As Internal Or External Command Error

1. Go to Control Panel -> System and Click on Advanced system settings.

2. Click of Environment variables button

3. Select Path and Click Edit.

4. Add the msbuild.exe file to the path variable and click OK.

5. Check MSBuild version via Command Prompt by using the following command:

 

msbuild -version

 

 

Path for Visual Studio 2015

%ProgramFiles(x86)%\MSBuild\14.0\Bin

Path for Visual Studio 2017

%ProgramFiles(x86)%\Microsoft Visual Studio\2017\<YOUR_VS_EDITION>\MSBuild\15.0\Bin

Path for Visual Studio 2019

%ProgramFiles(x86)%\Microsoft Visual Studio\2019\<YOUR_VS_EDITION>\MSBuild\Current\Bin

Path for Visual Studio 2022

%ProgramFiles%\Microsoft Visual Studio\2022\<YOUR_VS_EDITION>\MSBuild\Current\Bin

If you are using Developer command prompt for Visual studio you do not need to perform above steps.