3

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? For 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.

Community
  • 1
  • 1
Brian Triplett
  • 3,462
  • 6
  • 35
  • 61

1 Answers1

1

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.

Brian Triplett
  • 3,462
  • 6
  • 35
  • 61