Semver 2.3.0
See the version list below for details.
dotnet add package Semver --version 2.3.0
NuGet\Install-Package Semver -Version 2.3.0
<PackageReference Include="Semver" Version="2.3.0" />
paket add Semver --version 2.3.0
#r "nuget: Semver, 2.3.0"
// Install Semver as a Cake Addin
#addin nuget:?package=Semver&version=2.3.0
// Install Semver as a Cake Tool
#tool nuget:?package=Semver&version=2.3.0
A Semantic Version Library for .Net
Create, parse, and manipulate semantic version numbers with the SemVersion
class and semantic
version ranges with the SemVersionRange
class. This library complies with v2.0.0 of the semantic
versioning spec from semver.org.
API docs for the most recent release are available online at semver-nuget.org.
Parsing
var version = SemVersion.Parse("1.1.0-rc.1+e471d15", SemVersionStyles.Strict);
Constructing
var v1 = new SemVersion(1, 0);
var vNextRc = SemVersion.ParsedFrom(1, 1, 0, "rc.1");
Comparing
if (version.ComparePrecedenceTo(vNextRc) == 0)
Console.WriteLine($"{version} has the same precedence as {vNextRc}");
if (version.CompareSortOrderTo(vNextRc) > 0)
Console.WriteLine($"{version} sorts after {vNextRc}");
Outputs:
1.1.0-rc.1+e471d15 has the same precedence as 1.1.0-rc.1
1.1.0-rc.1+e471d15 sorts after 1.1.0-rc.1
Manipulating
Console.WriteLine($"Current: {version}");
if (version.IsPrerelease)
{
Console.WriteLine($"Prerelease: {version.Prerelease}");
Console.WriteLine($"Next release version is: {version.WithoutPrereleaseOrMetadata()}");
}
Outputs:
Current: 1.1.0-rc.1+nightly.2345
Prerelease: rc.1
Next release version is: 1.1.0
Version Ranges
var range = SemVersionRange.Parse("^1.0.0");
var prereleaseRange = SemVersionRange.ParseNpm("^1.0.0", includeAllPrerelease: true);
Console.WriteLine($"Range: {range}");
Console.WriteLine($"Prerelease range: {prereleaseRange}");
Console.WriteLine($"Range includes version {version}: {range.Contains(version)}");
Console.WriteLine($"Prerelease range includes version {version}: {prereleaseRange.Contains(version)}");
// Alternative: another way to call SemVersionRange.Contains(version)
version.Satisfies(range);
// Alternative: slower because it parses the range on every call
version.SatisfiesNpm("^1.0.0", includeAllPrerelease: true)
Outputs:
Range: 1.*
Prerelease range: *-* 1.*
Range includes version 1.1.0-rc.1+e471d15: False
Prerelease range includes version 1.1.0-rc.1+e471d15: True
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.1 is compatible. netstandard1.2 was computed. netstandard1.3 was computed. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net45 was computed. net451 was computed. net452 is compatible. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Windows Phone | wpa81 was computed. |
Windows Store | netcore was computed. netcore45 was computed. netcore451 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5.2
- No dependencies.
-
.NETStandard 1.1
- NETStandard.Library (>= 1.6.1)
-
.NETStandard 2.0
- No dependencies.
NuGet packages (68)
Showing the top 5 NuGet packages that depend on Semver:
Package | Downloads |
---|---|
UmbracoCms.Core
Contains the core assemblies needed to run Umbraco Cms. This package only contains assemblies and can be used for package development. Use the UmbracoCms package to setup Umbraco in Visual Studio as an ASP.NET project. |
|
Apprio.Enablement.Platform
Package Description |
|
Pulumi
The Pulumi .NET SDK lets you write cloud programs in C#, F#, and VB.NET. |
|
Apprio.Enablement.Telemetry.Exceptions
Package Description |
|
Cake.SemVer
Cake Build addon to provide Semantice Versioning classes and aliases. |
GitHub repositories (28)
Showing the top 5 popular GitHub repositories that depend on Semver:
Repository | Stars |
---|---|
dotnet/tye
Tye is a tool that makes developing, testing, and deploying microservices and distributed applications easier. Project Tye includes a local orchestrator to make developing microservices easier and the ability to deploy microservices to Kubernetes with minimal configuration.
|
|
WolvenKit/WolvenKit
Community Mod editor/creator for REDengine games.
|
|
spectresystems/jarvis
Your robotic butler.
|
|
bilal-fazlani/commanddotnet
A modern framework for building modern CLI apps
|
|
Crauzer/Obsidian
Wad archive editor for League of Legends
|
Version | Downloads | Last updated |
---|---|---|
3.0.0-beta.0 | 74 | 5/7/2023 |
2.3.0 | 226,900 | 2/21/2023 |
2.3.0-beta.0 | 1,711 | 12/28/2022 |
2.3.0-alpha.0 | 4,818 | 7/17/2022 |
2.2.0 | 1,129,493 | 6/12/2022 |
2.2.0-rc.0 | 1,002 | 5/15/2022 |
2.1.0 | 1,541,560 | 3/19/2022 |
2.1.0-rc.1 | 212 | 3/19/2022 |
2.1.0-rc.0 | 452 | 3/7/2022 |
2.0.6 | 5,649,780 | 12/28/2019 |
2.0.5 | 234,784 | 10/27/2019 |
2.0.4 | 2,688,027 | 8/1/2016 |
2.0.3 | 6,431 | 7/31/2016 |
1.1.2 | 2,681,097 | 5/13/2014 |
1.1.1 | 3,078 | 11/24/2013 |
1.1.0 | 1,566 | 11/15/2013 |
1.0.5 | 1,998 | 7/1/2013 |
1.0.4 | 1,664 | 7/1/2013 |
1.0.3 | 1,889 | 1/10/2013 |
1.0.1 | 1,581 | 1/10/2013 |
1.0.0 | 2,037 | 1/9/2013 |