Here is the script:
copy /y "$(SolutionDir)Libs\Detect.dll" "$(SolutionDir)$(ConfigurationName)"
call editbin.exe /LARGEADDRESSAWARE SER.EXE > post.txt
call dumpbin.exe /HEADERS SER.EXE > post1.txt
The error is
Error 306 The command "copy /y "C:\dev\blah\Libs\Detect.dll" "C:\dev\blah\Debug" call editbin.exe /LARGEADDRESSAWARE SER.EXE > post.txt call dumpbin.exe /HEADERS SER.EXE > post1.txt" exited with code 1.
Only one thing needs to be confirmed: Is this
SER.EXE
executed only in the release mode or just thisSER.EXE
is exist in the release folder and should be executed in the debug and release mode?If this
SER.EXE
only need to be executed in the release, Lex`s suggestion should to be considered. Pre- and Post-Build Events run as a batch script. You can do a conditional statement on $(ConfigurationName). For example:If this
SER.EXE
is exist in the release folder and should be executed in the debug and release mode, you just need to specify the release folder in the command:Obviously, you also need make sure the
SER.EXE
can be executed, you can use below command to test in the console application project:Note: When you want use this post-build event in both debug and release mode, you should add the command line for all configuration, Otherwise this command will only act on one mode (Just a reminder):
Hope this help.