This project is read-only.

Incrementing Assembly Version

Jan 28, 2013 at 5:13 PM

Hello,

We have our build version numbers set to 2.2.(Iteration).(revision). Our iteration changes once every 6 months, so at the moment we are on 2.2.112.1, but shortly it will change again. I have been using the following as the AssemblyFileVersion format: 2.2.112.b, but didn't realise this resets at the beginning of each day. How do I make it so that within any given time period, the last digit will always increment by 1 up until we move the iteration on. 

For example:

Build today should be 2.2.112.52
Build tomorrow should be 2.2.112.53
Build next iteration should be 2.2.113.1

Thanks 

Coordinator
Jan 28, 2013 at 6:30 PM

The "b" pattern macro uses the revision number provided by TFS and it comes from the Build Number Format: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r).  The revision number resets back to 1 if any part of the rest of the format changes.  Since the yyyyMMdd changes every day you can make it stop if you take out the date parameters.  If you do, I would put in something (simple text would do) that you could change manually to reset the revision back to 1 when you wanted.  It will then increment indefinitely.

Mark