Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>Build Version Updater
Build Version Updater

Build Version Updater

Samayas

samayas.eu
|
270 installs
| (2) | Free
Updates a version number.
Get it free

Overview

This extension provides a build task that automatically increments a predefined variable by 1 each time it executes. In CI/CD environments, this task streamlines version management by automatically updating version numbers after each successful build or release. This eliminates the manual effort of propagating version information when building DLLs or other artifacts with predefined versioning schemes.

Prerequisites

This extension supports Azure DevOps Server 2019 and Azure DevOps Online.

Video

A comprehensive video demonstration of this extension is available at https://l.samayas.eu/8HKbSI5zmc?P=AMP

How to use

After installing the extension, add the Build Version Updater task to a new or existing build definition or release definition.

Once added, the task appears in the pipeline :

add-task

Once you've added the task to your Build or Release pipeline you need to configure your individual task.

configure-task

Inside your task configuration you have 2 settings that are important:

  • Project Build Number Variable: The pipeline variable that will be automatically incremented.
  • Samayas Azure Devops Server: A service connection to the Azure DevOps Server.

Variables

The Project Build Number Variable specifies which variable the task will increment.

This variable must already exist in the pipeline and must be initialized to an integer value.

variables-task

Each time the task executes, it increments the specified variable by 1.

Samayas Azure DevOps Server Connection

This Task requires a Personal Access Token (PAT) to connect to Azure DevOps Server.

Creating a PAT key for Azure DevOps Server Online

Navigate to the Azure DevOps Online portal at https://dev.azure.com/youraccount. Click the user profile icon in the upper right corner and select Security from the menu.

security-menu

Once your have selected Security menu you'll see a Personal Access Tokens Menu.

PAT-before

Click on the New Token + to create a new token. A Pop-up will show up where u can create a PAT token.

PAT-create

  • Name: Provide a descriptive name to identify the token's purpose.
  • Organization: Select the specific organization or choose "All accessible organizations" (recommend selecting only the target organization for security).
  • Expiration: Specify a custom date or select a preset duration (30, 60, or 90 days)

Important: After the expiration you need to reupdate the token or the task won't work anymore. Or you can extent the expiration before expiry

The token requires the following scopes :

  • Build (Read & Execute)
  • Variable Groups (Read, create, & manage)

Select Custom defined scopes, and if these scopes are not visible, click Show all scopes.

PAT-overview

The token value is displayed only once. Copy and securely store this value for later use.

The newly created PAT appears in the token list :

PAT-overview

Creating a PAT key for Azure DevOps Server

Navigate to the on-premises Azure DevOps Server portal at https://devopsserver. Click the user profile icon in the upper right corner and select Security.

security-menu

Once your have selected Security menu you'll see a Personal Access Tokens Menu.

PAT-before

Click on the Add to create a new token. A Pop-up will show up where u can create a PAT token.

PAT-create

  • Name: Provide a descriptive name to identify the token's purpose.
  • Organization: Select the specific organization or choose "All accessible organizations" (recommend selecting only the target organization for security).
  • Expiration: Specify a custom date or select a preset duration (30, 60, or 90 days or 1 year)

Important: After the expiration you need to reupdate the token or the task won't work anymore. Or you can extent the expiration before expiry

The token requires the following scopes :

  • Build (Read & Execute)
  • Variable Groups (Read, create, & manage)

Select Custom defined scopes, and if these scopes are not visible, click Show all scopes.

PAT-overview

The token value is displayed only once. Copy and securely store this value for later use.

The newly created PAT appears in the token list :

PAT-overview

Creating a Service Connection

With the PAT created, establish a service connection.

Service connections can be created through two methods :

  • Click Manage directly from the task configuration.
  • Navigate to Project Settings → Pipelines → Service connections.

Both methods open the Service Connections settings page. The initial view may be empty or contain existing service connections for other services.

ServiceConnections-initial

Click New service connection and select Samayas DevOps Endpoint.

ServiceConnections-create

  • Connection name: Provide a descriptive name indicating its purpose.
  • PAT: Enter the Personal Access Token created in the previous step.

Click Create to finalize the service connection.

ServiceConnections-overview

The new connection appears in the service connections list.

Use Case : Building Complete Version Numbers

The incremented variable can be combined with other variables to construct complete version numbers.

Example variable structure :

  • ProjectBuildNumber: The auto-incremented build counter variable.
  • ProjectPrefixVersionNumber: A static variable defining the major and minor version.
  • ProjectVersionNumber: A composite variable that assembles the complete version string.

This composite variable can be referenced throughout the pipeline by other tasks

variables-task

Remarks: For Major.Minor.Build format: 1.0.{ProjectBuildNumber} produces 1.0.23.0 For Major.Minor.Build.Revision format: 1.0.0.{ProjectBuildNumber} produces 1.0.0.23

The extension provides flexibility to construct any version format—it simply maintains an incremental counter for use in version composition.

Selecting Service Connection in Task

After creating the service connection, select it from the dropdown in the task configuration.

The fully configured task appears as follows:

configure-task

Target

The goal of this add-in is to manage versioning after building successfully.

Version History

  • Version 1.0 Initial Version
  • Version 1.1 Release to Public
  • Version 1.1.1 Update Description
  • Version 1.2 Remove depreciated Task Handler
  • Version 2.0 New Logo
  • Version 2.1 Update logos, and add usage video and docs
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft