Skip to content

Instantly share code, notes, and snippets.

@JamesSkemp
Last active April 14, 2020 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamesSkemp/55084ea585b6c7453ee3e9f2d3e1c0b2 to your computer and use it in GitHub Desktop.
Save JamesSkemp/55084ea585b6c7453ee3e9f2d3e1c0b2 to your computer and use it in GitHub Desktop.
.NET auto versioning math

When using 1.0.*.* for the AssemblyVersion it will automatically populate the build and revision numbers.

Build number can be determined via the following LINQPad C# Statements.

var startingDate = new DateTime(2000, 1, 1);
DateTime.Now.Subtract(startingDate).Dump();

startingDate.AddDays(4695).Dump();
startingDate.AddDays(7409).Dump();

Sample output:

7409.15:27:31.6084809
11/8/2012 12:00:00 AM
4/14/2020 12:00:00 AM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment