I´m using Visual Studio 2010 to build an assembly from a C#-project with the following postbuild-event:
call "$(DevEnvDir)..\tools\vsvars32.bat"
editbin /largeaddressaware "$(TargetPath)"
sn -R "$(TargetPath)" "path/to/MySigningFile.snk"
However when I build the project I get that error:
Error MSB3073: The command "call "*Undefined*..\tools\vsvars32.bat" editbin /largeaddressaware "MyProgram.exe" sn -R "MyProgram" "path/to/MySingingFile.snk"" terminated with the following code 9009. (1, 1)
What makes me wonder is the "*undefined*" in the error. However when I open the environment-settings from within the post-build-events (Project properties --> Build Events --> Edit Post-build... --> Makros) I see that that variable should hold the value C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\
EDIT: I replaced the call to "$(DevEnvDir)..\tools\vsvars32.bat"
by the actual path where vsvars32
is located and it worked. So it seems although I can see the variable is set appropriately within VS it is not evaluated appropriately when building the project.