Reputation: 86779
I'm trying to perform the following post build step in a VS2008 project:
sn.exe **some arguments**
And keep on getting the error
'sn.exe' is not recognized as an internal or external command, operable program or batch file.
What path / environment variables are used when executing the post build steps? I had assumed that it was equivalent to the environment created by the visual studio command prompt, however apparently this isnt the case.
What would be the best way of making sure that I can use common build tools (such as sn.exe)
Upvotes: 3
Views: 2613
Reputation: 192587
Specify the full path to sn.exe in the command.
eg, c:\winsdk\bin\sn.exe
This works if you have the Windows SDK installed at c:\winsdk. If you have the Windows SDK installed at the traditional spot, then you might use
"c:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\sn.exe"
Be sure to use double-quotes around that path, because it includes spaces, and check/replace that version number.
I used the junction.exe tool to define a junction at c:\winsdk, referring to
"c:\Program Files\Microsoft SDKs\Windows\v6.1"
, which allows me to use either form.
Upvotes: 1