Constructor FileVersionQuad
- Namespace
- Ubiquity.NET.Versioning
- Assembly
- Ubiquity.NET.Versioning.dll
FileVersionQuad(ushort, ushort, ushort, ushort)
Represents a traditional "File" version QUAD of 16bit values
public FileVersionQuad(ushort Major, ushort Minor, ushort Build, ushort Revision)
Parameters
Major
ushortMajor version number
Minor
ushortMinor version number
Build
ushortBuild version number
Revision
ushortRevision number
Remarks
The "FILEVERSION" structure was first used in Windows as part of the Resource compiler's "VERSION" information (Still used to this day). However, it's use in other places exists and has grown as it is simple, and naturally fits (maps to) an unsigned 64bit value. Thus, CSemVer defines a specific mapping of values to this common format.
A standard .NET Version is very similar except that the bit width of each field is larger AND they are signed values. That is, every FileVersionQuad can produce a valid .NET Version. However, not every Version can result in a valid FileVersionQuad.
A file version is a quad of 4 ushort values. This is convertible to a ulong in the following pattern: (bits are numbered with MSB as the highest numeric value [Actual byte ordering depends on platform endianess])
Field | Description |
---|---|
bits 48-63 | Major part of Build number |
bits 32-47 | Minor part of Build number |
bits 16-31 | Build part of Build number |
bits 0-15 | Revision part of Build number (LSB indicates a release/CI build see remarks section for details) |
important
The role of the LSB for the Revision field is confusing as it indicates a CI build or not which itself is confusing. A CI build occurs AFTER a release! CI builds are ordered AFTER a release (or for a pre-release based on time only [0.0.0]). That is, a CI build ***always*** has a Patch+1 of a released build or [Major.Minor.Patch] == [0.0.0].
A file version cast as a ulong is NOT the same as an Ordered version number. The file version includes a "bit" for the status as a CI Build. Thus, a "file version" as a ulong is the ordered version shifted left by one bit and the LSB indicates if it is a Release/CI build
- See Also