Skip to content
This repository was archived by the owner on Aug 5, 2019. It is now read-only.

Version numbers

Olivier Spinelli edited this page Oct 17, 2018 · 3 revisions

AssemblyVersion

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).

AssemblyInformationalVersion

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.

Windows File Version (AssemblyFileVersion)

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.

File properties for CI-Build: file version is odd.

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

File properties for release: 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).

File properties for invalid release: file version is zero.

Clone this wiki locally