I'm using VS2010 and trying to sync the build version of my project with my Subversion repository using SubWCRev. This is all working correctly, but I can't quite get my head around one thing. My template file consists of this :
#define MAJOR_VERSION 2
#define MINOR_VERSION 2
#define MICRO_VERSION 0
#define BUILD_VERSION $WCMODS?$WCREV$+1:$WCREV$$
#define QUOTE_(x) #x
#define QUOTE(x) QUOTE_(x)
#define BUILD_VERSION_STRING QUOTE(MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION.BUILD_VERSION)
Then in my application .RC file I have :
VALUE "FileVersion", BUILD_VERSION_STRING
VALUE "ProductVersion", BUILD_VERSION_STRING
VALUE "Translation", 0x800, 1252
As you can probably work out, I'm trying to up the build version by 1 if there's modified code so that the build version in the EXE will match the Subversion revision number when I do a release and check the code in. The problem is that BUILD_VERSION gets expanded to x+1 or x+0 which then appears in the BUILD_VERSION_STRING as "18.104.22.168+1" which is not quite what I intended.
Does anyone with a little more experience with this know a way to achieve my aim?
Thanks in advance
以上就是Visual Studio with SubWCRev auto-build versioning problem的详细内容，更多请关注web前端其它相关文章！