vsts-assemblyinfo-task icon indicating copy to clipboard operation
vsts-assemblyinfo-task copied to clipboard

Wildcard versioning - auto increment

Open dwbeva opened this issue 1 year ago • 1 comments

When using the wildcard versioning (for ex 1.0.0.*), is there a way to make it so the wildcard is generated sequentially? That is, it would be 1.0.0.0 on the first build, then 1.0.0.1, then 1.0.0.2 ...

dwbeva avatar Oct 08 '23 22:10 dwbeva

You should use ADO build variables for this. The Counters expression works great for this. Create one that stores a counter against the non-sub number e.g. 1.0.0 and you will then simply need to pass e.g. 1.0.0.$(IncrementableNumber) into the AssemblyInfoTask.

Wildcard versioning is presumably to support specific MSBuild behaviour.

Qukicelyn avatar Mar 14 '24 11:03 Qukicelyn