Monday, March 22, 2010 8:46 AMHi All,
I am getting the below error when I do clean up of my project.
>------ Clean started: Project: BuildSDK, Configuration: Debug X64 ------
1>Build started 3/22/2010 12:03:48 PM.
1> 'NMAKE' is not recognized as an internal or external command,
1> operable program or batch file.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(33,5): error MSB3073: The command "NMAKE /f BuildSDK.mak clean CONFIGURATIONNAME=Debug RELATIVEROOTPATH=..\..\.. /a" exited with code 9009.
This project was working fine in VS2003 and it has been upgraded to VS2010 now.
I have checked the path "VC++ Directories"/"Executable Directories", it does contain $(VCInstallDir)bin and assume $(VCInstallDir) is c:\Program Files\Microsoft Visual Studio 10.0\VC\ . Even I have mentioned the latter path explicitly but no luck. I tried with c:\Program Files\Microsoft Visual Studio 10.0\VC\bin/amd64 as well but no improvement.
Any help or suggestions would be very much appreciated.
Thanks in advance.
Monday, March 22, 2010 5:01 PM
Yes, there is a known issue in VS2010 that the environment is not set up properly for nmake clean command. As a result, nmake cannot be found when doing clean. You can workaround the issue by one of the following method:
- Launching Devenv from Visual Studio command prompt: devenv /useenv
- Have the nmake clean command calling a batch file, in which the build environment is set including the PATH to nmake.
You can also do rebuild instead of clean/build. It should properly clean up and build.
Li Shao, MSFT
- Marked As Answer by Nancy ShaoModerator Monday, March 29, 2010 2:46 AM
Monday, June 21, 2010 9:14 PM
Thanks for the feedback. Please take a look of this blog for build issues when upgrading to VS2010: http://blogs.msdn.com/b/vcblog/archive/2010/03/02/visual-studio-2010-c-project-upgrade-guide.aspx
Li Shao, MSFT
Thursday, November 15, 2012 7:53 PMThanks, this is exactly what I was looking for. Annoying, but good to know I wasn't missing something. Has this issue been fixed in a fixpack or in later versions?