Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change the version format of a C# project?

Instead of the major.minor.build.revision format, I'd like to use date and time for version numbers. Something more like day.month.year.time. Is there a way to change the format of the AssemblyVersion attribute in AssemblyInfo.cs?

like image 470
Lee Crabtree Avatar asked Dec 10 '22 20:12

Lee Crabtree


1 Answers

You can put whatever numbers you want in there (as long as they don't overflow the data types that contain them in memory) and call them whatever you wish. I am not sure why you would want to do this, however, as the standard format usually has some form of the date stored in the build field.

For example, here is the assembly version format that we use where I work:

5.1.729.1

This tells me that this is an assembly from version 5.1 of the library, built on July 29th, and was the first build of the day. Subsequent builds on the same day simply increment the revision field.

like image 54
Andrew Hare Avatar answered Feb 15 '23 11:02

Andrew Hare