visual-studio-2008 versioninfo for all files updated from one place -
the version information, displayed when mouse cursor hovers on file in windows explorer, set file built visual studio in version resource. set version in 1 place files built solution, preferably when change version in install properties. there way this?
the motivation if version not updated file, installer leave previous versions of files instead of replacing them new files. happens when 'removepreviousversions' property set. in order save tedious , error prone task of updating version in every file built , installed, remove version resource files - not elegant.
the second answer in stack overflow topic how programatically change project's product version? features solution setting version number common header file in c++. place header file containing hard-coded version numbers in folder each project can find it.
the above answer describes means of incrementing version number. alternate approach c++ version incrementing available microsoft's article how increment version information after each build in visual c++.
alternately, can use source control repository revision number part of version number. stack overflow article creating file build number , branch name in svn gives insight tortoisesvn users. following 2 articles explore in more depth:
integrating subversion revision version automatically .net (c# or vb)
integrating subversion revision version automatically native c/c++
(the above 2 web pages feature links similar procedures tortoisehg users)
in theory, have single text file holding new version number, run pre-build script would:
- increment version number in text file (optionally incorporating repository revision number)
- write out or modify common version files for:
- c++ (version.h)
- c# (globalassemblyinfo.cs)
- java (by way of ant properties file, e.g. version.properties)
- etc.
Comments
Post a Comment