Troubleshooting Microsoft Visual Studio* Command Prompt Integration Issue

ID 662886
Updated 3/22/2018
Version Latest



Issue Description

Nmake and ifort are not recognized from a command window, however using Intel® Fortran Compiler under Microsoft Visual Studio* works perfectly.


Follow below checklist to troubleshooting Visual Studio command environmental issues:

1. Verify whether ifort and nmake are installed correctly:

    For Visual Studio 2017, nmake is installed at:

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\nmake.exe

    Find this by running below commands from a system ifort or nmake setup correctly:

  > where nmake
  > where ifort

    Also check whether the location is included from PATH environment:

  > echo %PATH%

2. If nmake can be found, verify if Visual Studio setup script runs properly.
    Start a cmd window, and run Visual Studio setup script manually:

  > "C:\Program Files (x86)\Microsoft Visual Studio\2017 \Professional\VC\Auxiliary\Build\vcvars64.bat"

    An expected output is as below


3. If nmake cannot be found. It’s your Visual Studio installation is incomplete. Please try re-install Visual Studio and find instructions from below articles:
4. Got an error in step 2?
  > "C:\Program Files (x86)\Microsoft Visual   Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
  \Common was unexpected at this time.
If yes, try debug the setup script set VSCMD_DEBUG environment variable:
  > set VSCMD_DEBUG=3
Run the setup script again and redirect the output to log file:
  > "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat" > setup.log 2>&1

5. If you got the same error as above, there are some references from Visual Studio community:

    The solution is to remove all quotes from PATH environment variable value.
6. If you got a different error, again get an expected output from any system that runs the script correctly and compare with your current one. This will help you locate which command in the setup script that triggers the error. 
    You may also consider to report such issue to Visual Studio community directly at