December 31, 2012

TFS 2010 Build Number Format


In TFS 2010, Build Number Format in Build Definition uses date format by default. For example, here is the Build Number Format.

$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)

TestBuild_20121231.1

TestBuild_20121231.2

TestBuild_20121231.3
....

The build number is incremental on Dec 31, 2012

If our project would like to use Major release 2 and Minor Release 1, the following build number format can be used easily.

$(BuildDefinitionName)_2.1.0$(Rev:.r)

ProjectName_2.1.0.1

Projectname_2.1.0.2

Projectname_2.1.0.3


Can we put the following Build Number format? The answer is no because the following screenshot will appear.

$(BuildDefinitionName)_2.1.$(Rev:.r).182.



You can modify the Build Process Template (xaml) to meet your need of Build Number format as well.

No comments:

Post a Comment