I have an unmanaged program (Fortran) that I'm adding a Version.rc resource file to include version information. Is there a way to update the last number of the version information at build time with a random number generated at each build? F开发者_高级运维or example.
FILEVERSION = <major>,<minor>,<rev>,<build_hash>
where is updated at each build and the others are input.
This question is similar to Programmatically updating FILEVERSION in a MFC app w/SVN revision number except its not with an SVN number.
As @Hans suggested above. The best approach was to add a pre-build event in Visual Studio that runs a script (Perl in this case) to reach into the *.rc file and change the to a random number.
精彩评论