Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>Update versions and rename build
Update versions and rename build

Update versions and rename build

Dutchworkz B.V.

|
505 installs
| (2) | Free
One of the tools in the DutchWorkz Tools Suite: this buildtask will update your AssemblyVersion.cs file so all binaries will have similar versions. Also renames your build.
This extension is now unpublished from Marketplace. You can choose to uninstall it.

DutchWorkz Tools for Build and Release

The DutchWorkz Tools Suite is a set of Build and Release tasks which will make life of a developer a lot easier. You are welcome to request new tools if you can think of a useful new task that does not exist yet. If you are happy with this task, please be so kind to add your (5-star) review on the Marketplace.

Update 26/06/2019

Version 2 was released: this version is able to update the minor version number with the build-ID in files named (Global)AssemblyInfo.*. This will be thefallback option if no minor was specified.

Update 30/11/2016

As mentioned in a review, there was a bug causing the filepattern to be fixed to AssemblyVersion.*. Version 1.2.9. solves this issue.

Update Assembly Version

This task can be used to update the version in your AssemblyVersion.cs files. If you place it prior to your Visual Studio Build task, it will result in assemblies with the correct versions. Currently a single configuration is supported: you should create 2 variables in your definition for the Major and Minor version. Next version adds the option to get those two numbers from the source-file itself. The next 2 parts will be generated automatically.

Build name

This task will also update your buildname: it concatenates the definitionname and the versionnumber it generated, combined with an underscore.

Prerequisites

The most convenient approach to utilize this task is by adding a file to your solution, for example stored in the root folder of your solution, and add that file as a linked assembly to each of your projects. Make sure to only add the version elements and the Copyright en Company elements. These elements should then be removed from the existing AssemblyInfo files: the values in the AssemblyVersion.cs file will be populated by this task.

Formatting of the versionnumbers

An assembly contains 3 versions: AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion. Here's an example of possible values if you would specify a Major of 2, a Minor of 1 and you run a build with ID 7593 on December 28th 2016, at 13:05 local time.

AssemblyVersion: 2.3.0.0
AssemblyFileVersion: 2.3.16362.1305
AssemblyInformationalVersion: 2.3.20161228.7593

The AssemblyFileVersion is based on the year (2016 results in 16) and the day of the year (December 28 is day 362), due to length limitations. This way it won't exceed the maximum number of 65535.

Re-use of the versionnumber

To use the generated versionnumber in subsequent tasks, use variable

$(DutchWorkz_GlobalVersion)

About DutchWorkz

DutchWorkz is specialized in supplying flexible and high-quality ICT Capacity in the areas of Custom Software Development (Microsoft .NET Product Portfolio), Information Analysis, Architecture, Testing and Project Management. DutchWorkz professionals are flexible and have a pragmatic view. Like real teamplayers they, together with our clients, make sure to reach and exceed goals and expectations.

Contact us through our Website, LinkedIn, Facebook or Twitter.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft