I configured Microsoft Visual Studio to use the Makefile configuration type, and I wrote a makefile to create my project using Microsoft tools. In the NMake section of the project configuration, I installed the build build.bat assembly, which is a file that simply calls nmake with my make file as a command line argument, for example:
nmake /nologo /f makefile.x86.winnt.msvc2010
This works great.
For cleaning, I wrote a target in my makefile, which removes all assembly artifacts. It looks like this:
Therefore, I set a clean command line as a call to nmake with a clean argument. Like this:
nmake /nologo /f makefile.x86.winnt.msvc2010 clean
I put this text in clean.bat and set it as "Clean command line", but it does not work because the calling shell cannot find nmake. I checked the path during a clean call, and MSVS does not include build tools in the path (including nmake) to clear. (Note that the above nmake command is executed from a shell that has nmake in PATH).
How can I get MSVS to enable build tools in PATH so that I can invoke nmake on a clean command line? Or is there a better solution?
source share