-
Notifications
You must be signed in to change notification settings - Fork 5
Version numbers
The assembly version consists only of the Major.Minor numbers: the third and fourth numbers are always 0. This follows the semantic versioning rules and is "a common approach that gives you the ability to roll out hot fixes to your assembly without breaking existing applications that may be referencing it" (excerpt from GitVersion documentation).
The informational version is displayed in the file's property window (see captures below). SimpleGitVersion uses the implementation available in CSemVer. https://github.com/SimpleGitVersion/CSemVer-Net/blob/develop/CSemVer/InformationalVersion.cs
It is this string: $"{semVer} ({semVerShortForm}) - SHA1: {commitSha} - CommitDate: {commitDateUtc.ToString( "u" )}"
Note that is has no contextual information like user name or build machine name to ease reproducible builds.
Each CSemVer version is associated to a unique number between 1 (v0.0.0-alpha) and 4000050000000000000 (v99999.49999.9999). This number requires 63 bits: a positive long (signed 64 bits integer) is enough.
The windows FILEVERSION is a binary version number for the file that is displayed in the property window. The version consists of two 32-bit integers, defined by four 16-bit integers. SimpleGitVersion uses the whole 64 bits for the file version: the CSemVer version is multiplied by 2 and when generating a CI-Build, 1 is added.

For CI-Build, file version is odd. For a release, the file version is even:

When the release is invalid, the file version is 0.0.0.0 (and the Product Version contains the error message).
