Search code examples
tfsmsbuildtfsbuildtfs-2015

TFS 2015 Build vNext $(Rev:.rr) stuck at 1


The New TFS Build System (vNext) does not come with a versioning function "out-of-the-box" so, to supply that, there are tutorials such as this one:

http://incyclesoftware.com/2015/06/vnext-build-awesomeness-managing-version-numbers/

Where you can see that Microsoft actually supports this with an example Azure Script: https://msdn.microsoft.com/en-us/library/vs/alm/build/scripts/index

So far so good. However, by following those exact steps, my build number now has the REV value stuck at 1. That is, no matter how many builds I do in a row, they all have the "01" stuck at the end.

If I remove the specific "Build Number Format" command (Edit Build Definition > General > Build Number Format), that is: $(BuildDefinitionName)_$(MajorVersion).$(MinorVersion).$(Year:yy)$(DayOfYear)$(Rev:.rr) it does increment the version but with the default numbering that TFS2015 uses for builds.

As far as I understood, the REV value increments automatically, so much that there is no possible way of changing it, as we can see in this SO Question: TFS 2015 vNext force build number

So, my question is as follows: is there a parameter that is not listed or missing somewhere that actually prevents the Rev value from increasing? Maybe is there a problem on my installation?

Please note that this happens within the same day, so the rest of the build name does not change in order to justify it remaining at "01".

Thanks in advance for any help or advice.


Solution

  • There is a known issue with VSTS and TFS 2015 where the revision counter doesn't increase when certain special characters are part of the name of the build definition. E.g. [].