0

I would like to increment the build revision version for every new successful build.

I mentioned the version number in SharedAssemblyInfo class as

 [assembly: AssemblyVersion("18.12.0.*")]

I am facing the versioning issue because of the below scenario.

If you the put “*” at the 4th box in the above step, the version will be generated as 1.0.0.Y where Y is the number of seconds from midnight. This may cause a versioning issue. For example, when the last version was build in the afternoon yesterday (e.g. Y=15000, the version is 1.0.0.15000) and the new version is built today morning (Y=8000, the version number will be 1.0.0.8000), then the new version number is smaller than the old version.

How can I resolve the issue?

Nikhil
  • 21
  • 5
  • 1
    Just FIY, what you're trying to automatically increment isn't the build version, but actually the revision version. See the [MS docs](https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assemblyversionattribute?redirectedfrom=MSDN&view=net-5.0#remarks) for reference – MindSwipe Nov 13 '20 at 08:26
  • 1
    Version is in format: ..., you are expected to use `"18.12.*"` if you wan't that *"default build number increments daily"* ([source](https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assemblyversionattribute)). – Sinatr Nov 13 '20 at 08:29
  • I do agree with you, but I need increment by one – Nikhil Nov 13 '20 at 10:05

0 Answers0