Wikis - Page

Knowledge Doc: [Static Code Analyzer] "MSBuild' is not recognized as an internal or external command, operable program or batch file

0 Likes

Summary
Trying to scan a project with Static Code Analizer (SCA) with MSBuild but receive the following error: "MSBuild' is not recognized as an internal or external command, operable program or batch file

Products
Fortify Static Code Analyzer

Environment
Static Code Analyzer

Situation
Trying to scan a project with Static Code Analizer (SCA) with MSBuild but receive the following error:
"MSBuild' is not recognized as an internal or external command, operable program or batch file.

Cause
You have to make sure you have installed MSBuild on your system and if you have it installed, this error means that MSBuild is not added to the System Environment Variables

Resolution
You need to locate the directory for MSBuild, usually in:
C:\Program Files (x86)\Microsoft Visual Studio\<version>\BuildTools\MSBuild\15.0\Bin
Once you have found the path to MSBuild.exe, you need to add its path to the PATH environment variable so that you can use it in your terminal:

  1. Open the control panel.
  2. Click on System and Security and then on System.
  3. In the left pane, click on Advanced system settings.
  4. At the very bottom of the pop up, click on Environment Variables
  5. Edit the Path variable and append the folder's path that contains the MSBuild.exe to it

Knowledge Base Article Link


URL Name
KM000017387

Labels:

Support Tips/Knowledge Docs
Comment List
Related
Recommended