Reputation: 73
I have a build pipeline in Azure DevOps and I would like to increment the version of my assemblies with each change in the project. In the current build definition the version of the assemblies will increase with each build for all projects/assemblies.
So when I merge the dev branch to the main branch (reverse integration) the trigger runs a build on an agent and it will increase the version number for all projects in the main branch.
The project types are .NET Framework, .NET Core, .NET Standard
Is there a way to increase the version number for the changed projects/assemblies only?
Upvotes: 1
Views: 6346
Reputation: 31003
Unfortunately, there is no default way to increase the assembly version only for the changed project. You could try @MartinSGill's workaround, for the situation that need to version independently you could give them their own builds. Then have a separate pipeline that collects them all into a single "release".
Here is an useful extension for your reference:
https://marketplace.visualstudio.com/items?itemName=bleddynrichards.Assembly-Info-Task
Upvotes: 3