To achieve this create 2 batch files
1. debugpostbuild.bat
2. releasepostbuild.bat
Update post-build event command line as follows:-
1. goto VS2010 -> right click on your project -> properties -> Build Events
2. copy below code
if $(ConfigurationName) == Release ( call $(SolutionDir)\debugpostbuild.bat ) else ( call $(SolutionDir)\releasepostbuild.bat )
That's it. so simple.
Any sufficiently advanced technology is indistinguishable from magic. ~Arthur C. Clarke
Just this will do:
ReplyDeletecall $(SolutionDir)\$(ConfigurationName)postbuild.bat
How can I use VS enviromnent variables like $(ProjectDir) within the bat file ?
ReplyDeletePass $(ProjectDir) as an argument to the batch file as :-
ReplyDeletecall $(SolutionDir)\$(ConfigurationName)postbuild.bat $(ProjectDir)
use %1 inside your batch file to refer to the argument passed
Thanks !
ReplyDelete