Is it possible to Rename or give a custom name to a Build in VSTS? Is it possible to Rename or give a custom name to a Build in VSTS? powershell powershell

Is it possible to Rename or give a custom name to a Build in VSTS?


You can update the build number for current build through Logging Command (e.g. Write-Host "##vso[build.updatebuildnumber]buildnumber").

Simple workflow of your code:

  1. Include $(rev:.r) in default build number format (Options), for example: $(date:yyyyMMdd)-$(rev:.r)
  2. Get current build number from pre-defined variable (Build.BuildNumber/BUILD_BUILDNUMBER)
  3. Get the rev value from this build number in your code
  4. Read version number from .version file
  5. Update build number through Logging Command


Under your build definition you can customize the build name (Build number format):

For example, I added the date variable $(Date:dd.MM.yyyy) with a specific format to the field Build number format:

Build number format

Microsoft Docs, reference article