Export (0) Print
Expand All

Use build numbers to give meaningful names to completed builds

You can define your build process to load useful data into the name of each completed build.

For example:

  • The team project is named FabrikamCore.

  • The build definition is named CIBuild.

  • The build ID is 4.

  • The date is August 24, 2009.

  • The time is 9:50:43 PM.

  • The build has been run one time today.

You define a default build process and set BuildNumberFormat to:

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

In this case, the second completed build on this day would be named:

CIBuild_20090824.2

The following table shows how each token is resolved based on the previous example:

Token

Replacement value based on the example earlier in this section

$(BuildDefinitionName)

CIBuild

$(BuildID)

4

What is the build ID?

$(DayOfMonth)

24

$(DayOfYear)

236

$(Hours)

09

$(Minutes)

50

$(Month)

08

$(Rev:.rr)

02 (The next build on this day will be 03, and so on.)

What is the Rev?

$(Date:MMddyy)

082409

$(Seconds)

50

$(TeamProject)

FabrikamCore

$(Year:yy)

09

$(year:yyyy)

2009

You can:

$(BuildID) is an internal immutable ID.

Use $(Rev:.rr) to ensure that every completed build has a unique name. When a build is completed, if nothing else in the build number has changed, the Rev integer value is incremented by one.

Show:
© 2015 Microsoft