none
[VS2017]NMAKE is not recongnizing in command prompt.

    Question

  • VsMSBuildCmd.bat is executed, but NMAKE command is not recognized in command prompt. But it is working through developer command prompt of VS 2017. I have some build script file it uses both MSBUILD.exe and NMAKE.

    Previously we used vcvar32.exe to setup build environment. In that case, both MS build and NMAKE works properly. Any known issue or solution.?

    Monday, April 24, 2017 10:05 AM

Answers

  • Hi Krish_2404,

    Thanks for posting here.

    As the NMAKE Reference, "To use NMAKE, you must run it in a command prompt window that has the required paths and environment variables set for the Visual C++ build tools, libraries, and include files. The easiest way to do this is to run it in a developer command prompt window." So need to set the the Path and Environment Variables for Command-Line Builds, we can open a plain Command Prompt window and then run the vcvarsall.bat command file.

    For the Visual Studio 2017, the vsvars32.bat no longer exists in the path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools instead of "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\vsdevcmd\ext".

    After test, I found the solution for this issue, after executed the VsMSBuildCmd.bat, still need to executed the vcvars.bat. In this case, NMAKE command would be recognized in command prompt.

    Hope this can help you.


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 26, 2017 4:42 AM

All replies

  • Hi Krish_2404,

    Thanks for posting here.

    As the NMAKE Reference, "To use NMAKE, you must run it in a command prompt window that has the required paths and environment variables set for the Visual C++ build tools, libraries, and include files. The easiest way to do this is to run it in a developer command prompt window." So need to set the the Path and Environment Variables for Command-Line Builds, we can open a plain Command Prompt window and then run the vcvarsall.bat command file.

    For the Visual Studio 2017, the vsvars32.bat no longer exists in the path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools instead of "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\vsdevcmd\ext".

    After test, I found the solution for this issue, after executed the VsMSBuildCmd.bat, still need to executed the vcvars.bat. In this case, NMAKE command would be recognized in command prompt.

    Hope this can help you.


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 26, 2017 4:42 AM
  • @Krish_2404, Does the answer resolve your question? If not, could you please let me know the latest status of this question?

    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 28, 2017 2:50 AM
  • This doesn't work for me. I followed your exact steps and still get that nmake is not recognized.


    Thursday, November 23, 2017 7:32 PM

  • As of this point of time, vcvars.bat does not even exist at the shown path in the picture. Neither is NMAKE available in developer command prompt for VS2017. Hope that this thing is fixed soon.
    Wednesday, November 29, 2017 12:30 PM