I'm trying to use SubWCRev so that I can use subversion's revision number as part of the version number that is displayed in my program. Right now, I have to run SubWCRev manually everytime I want the version number to reflect the right revision number. I want to do this automatically -- perhaps have the execution of SubWCRev.exe triggered when my program is built.
There are number of places where you can add build-related actions.
Open Project - Properties - Configuration Properties - Build Events. There are Pre-Build, Pre-Link and Post-Build events. Pre-Build event is used to prepare some files for compilation and linking. Post-Build event is used to do something with resulting executable files.
It is possible assosiate some command with specific file. Right-click on any project file, select Properties - Custom Build Step. It is executed before project build.
I don't know how SubWCRev.exe works. If it modifies source or .rc file, use Pre-Build or Custom Build step. If it modifies output executable, use Post-Build step.
Bookmarks