Ubiquity.NET.Versioning
6.0.1-alpha
See the version list below for details.
dotnet add package Ubiquity.NET.Versioning --version 6.0.1-alpha
NuGet\Install-Package Ubiquity.NET.Versioning -Version 6.0.1-alpha
<PackageReference Include="Ubiquity.NET.Versioning" Version="6.0.1-alpha" />
<PackageVersion Include="Ubiquity.NET.Versioning" Version="6.0.1-alpha" />
<PackageReference Include="Ubiquity.NET.Versioning" />
paket add Ubiquity.NET.Versioning --version 6.0.1-alpha
#r "nuget: Ubiquity.NET.Versioning, 6.0.1-alpha"
#:package Ubiquity.NET.Versioning@6.0.1-alpha
#addin nuget:?package=Ubiquity.NET.Versioning&version=6.0.1-alpha&prerelease
#tool nuget:?package=Ubiquity.NET.Versioning&version=6.0.1-alpha&prerelease
About
The Ubiquity.NET.Versioning library provides types to support use of versioning via
- Semantic Versioning
- Constrained Semantic Versioning
- Including Continuous Integration (CI) via CSemVer-CI
It is viable as a standalone package to allow validation of or comparisons to versions reported at runtime. (Especially from native interop that does not support package dependencies or versioning at runtime.)
Example
var quad = new FileVersionQuad(SomeAPiThatRetrievesAFileVersionAsUInt64());
// ...
// NOTE: Since all that is available is a QUAD, which has only 1 bit for CI information,
// there is no way to translate that to a formal CSemVer-CI. Just test ordering of the quad.
if(quad > MinimumVer.FileVersion)
{
// Good to go!
if( quad.IsCiBuild )
{
// and it's a CI build!
}
}
// ...
static readonly CSemVer MinimumVer = new(1,2,3/*, ...*/);
Formatting
The library contains support for proper formatting of strings based on the rules
of a SemVer, CSemVer, and CSemVer-CI. The formatting is done case preserving when
possible (Some cases of CSemVer will use string substitution such that PreRelease
would
simply become pre
).
Parsing
The library contains support for parsing of strings based on the rules of a SemVer, CSemVer, and CSemVer-CI
Ordering
The types all support IComparable<T>
<sup>1</sup> and properly handle correct
sort ordering of the versions according to the rules of SemVer (Which, CSemVer and CSemVer-CI
follow with the exception of explicit case insensitivity for AphaNumeric IDs)
The formal 'spec' for CSemVer remains mostly silent on the point of the short format. See this known issue. Since, the existence of that form was to support NuGet V2, which is now obsolete, this library does not support the short form at all. (This choice keeps documentation clarity [NOT SUPPORTED] and implementation simplicity)
<sup><a id="footnote_1">1</a></sup>Unfortunately, major repositories using SemVer have
chosen to use different comparisons. Thus, a consumer is required to know a-priori if the
version is compared insensitive or not. Thus all constructors accept an enum indicating
the sort ordering to use. Additional, parsing accepts an IFormatProvider, which should
provide an AlphaNumeirvOrdering
value to specify the ordering. If none is provided, the
default is used. (SemVer uses CaseSensitive comparisons, CSemVer and CSemVerCI ALWAYS use
case insensitive) IComparer<SemVer>
instances are available for cases where the versions
are from mixed sources and the application wishes to order the versions.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Sprache (>= 2.3.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Ubiquity.NET.Versioning:
Package | Downloads |
---|---|
Ubiquity.NET.Llvm.Interop
.NET Low Level Interop Bindings for Ubiquity.LibLLVM []. Direct use of this low level API is **STRONGLY** discouraged, instead you should use the Ubiquity.NET.Llvm package, which provides a full C# object model projection of the LLVM APIs on top of this library. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
6.0.1 | 165 | 7/15/2025 |
6.0.1-beta | 133 | 7/14/2025 |
6.0.1-alpha | 136 | 7/10/2025 |
5.0.4 | 90 | 6/28/2025 |
5.0.3-alpha | 81 | 6/27/2025 |
5.0.1-alpha | 80 | 6/27/2025 |
5.0.0-rc.1 | 267 | 6/10/2025 |
5.0.0-rc | 201 | 6/4/2025 |
4.0.0-a | 140 | 5/21/2025 |