PDA

View Full Version : How do I conditionally set version?


dsmith
09-14-2004, 02:57 PM
Is there a flag I can set that would conditionally perform set version? In order to set a version to .RC file, I need to check it out of source control which can take a long time. For debug builds I do not want to increment the .RC file.

kinook
09-14-2004, 03:13 PM
I'm assuming you're using the Make VC6 or Make VS.NET action to build some VC project(s) or solution(s). If so, use a field override for the set/increment version radio button and then dynamically set the override value as appropriate based on the configuration being built (a value of 0 = no, 1 = increment 2 = set).

This is demonstrated in the VisBuildPro.bld sample (search for 'Build VC6' or 'Build VSNET' in that project). It sets the override value to %VERSEL%, which defaults to 0 via a project macro, but is overridden on the command-line from Master.bld with a value of 1 to increment the version.

See 'field overrides' in the help index for more details on that functionality.