Semver 3.0.0
dotnet add package Semver --version 3.0.0
NuGet\Install-Package Semver -Version 3.0.0
<PackageReference Include="Semver" Version="3.0.0" />
<PackageVersion Include="Semver" Version="3.0.0" />
<PackageReference Include="Semver" />
paket add Semver --version 3.0.0
#r "nuget: Semver, 3.0.0"
#addin nuget:?package=Semver&version=3.0.0
#tool nuget:?package=Semver&version=3.0.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+e471d15
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 is compatible. 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. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | 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 | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- IndexRange (>= 1.0.3)
- Microsoft.Bcl.HashCode (>= 1.1.1)
- Microsoft.Extensions.Primitives (>= 2.0.0)
-
.NETStandard 2.1
- Microsoft.Extensions.Primitives (>= 3.0.3)
-
net5.0
- Microsoft.Extensions.Primitives (>= 5.0.1)
NuGet packages (115)
Showing the top 5 NuGet packages that depend on Semver:
Package | Downloads |
---|---|
Pulumi
The Pulumi .NET SDK lets you write cloud programs in C#, F#, and VB.NET. |
|
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 |
|
Apprio.Enablement.Telemetry.Exceptions
Package Description |
|
Flagsmith
Client SDK for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://flagsmith.com/ |
GitHub repositories (38)
Showing the top 20 popular GitHub repositories that depend on Semver:
Repository | Stars |
---|---|
LykosAI/StabilityMatrix
Multi-Platform Package Manager for Stable Diffusion
|
|
ChilliCream/graphql-platform
Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Nitro the awesome Monaco based GraphQL IDE.
|
|
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.
|
|
microsoft/onefuzz
A self-hosted Fuzzing-As-A-Service platform
|
|
betwixt-labs/bebop
🎷No ceremony, just code. Blazing fast, typesafe binary serialization.
|
|
TEdit/Terraria-Map-Editor
TEdit - Terraria Map Editor - TEdit is a stand alone, open source map editor for Terraria. It lets you edit maps just like (almost) paint! It also lets you change world settings (time, bosses downed etc), edit chests and change sign, make epic dungeons, castles, cities, and add rewards for your adventurers!
|
|
WolvenKit/WolvenKit
Community Mod editor/creator for REDengine games.
|
|
BedrockLauncher/BedrockLauncher
|
|
spectresystems/jarvis
Your robotic butler.
|
|
PhantomGamers/SFP
This utility is designed to allow you to apply skins to the modern Steam client
|
|
bilal-fazlani/commanddotnet
A modern framework for building modern CLI apps
|
|
aspose-words/Aspose.Words-for-.NET
Aspose.Words for .NET examples, plugins and showcases
|
|
VolcanicArts/VRCOSC
Modular OSC program creator, toolkit, and router made for VRChat. Show your heartrate, time, hardware stats, speech to text, control Spotify, and more! Includes drag-and-drop prefabs for your avatar.
|
|
X2CommunityCore/xcom2-launcher
The Alternative Mod Launcher (AML) is a replacement for the default game launchers from XCOM 2 and XCOM Chimera Squad.
|
|
pearlxcore/PS4-PKG-Tool
Manage and perform various operations on PS4 PKG.
|
|
toniebox-reverse-engineering/teddy
With this tool you can dump existing files for the famous audio box or create custom ones.
|
|
WalkerCodeRanger/semver
A semantic version library for .NET fully compliant with v2.0.0 of the spec found at http://semver.org/.
|
|
circuitdiagram/circuitdiagram
A user-friendly program for making electronic circuit diagrams.
|
|
openmod/openmod
OpenMod .NET Plugin Framework
|
|
solidify/jira-azuredevops-migrator
Tool to migrate work items from Atlassian Jira to Microsoft Azure DevOps/VSTS/TFS.
|
Version | Downloads | Last updated | |
---|---|---|---|
3.0.0 | 734,614 | 6 months ago | |
3.0.0-beta.2 | 874 | 6 months ago | |
3.0.0-beta.1 | 29,367 | 8/21/2023 | |
3.0.0-beta.0 | 5,869 | 5/7/2023 | |
2.3.0 | 5,114,370 | 2/21/2023 | |
2.3.0-beta.0 | 2,807 | 12/28/2022 | |
2.3.0-alpha.0 | 7,202 | 7/17/2022 | |
2.2.0 | 2,112,375 | 6/12/2022 | |
2.2.0-rc.0 | 1,559 | 5/15/2022 | |
2.1.0 | 5,337,928 | 3/19/2022 | |
2.1.0-rc.1 | 495 | 3/19/2022 | |
2.1.0-rc.0 | 720 | 3/7/2022 | |
2.0.6 | 7,816,756 | 12/28/2019 | |
2.0.5 | 332,969 | 10/27/2019 | |
2.0.4 | 3,342,418 | 8/1/2016 | |
2.0.3 | 21,765 | 7/31/2016 | |
1.1.2 | 3,282,522 | 5/13/2014 | |
1.1.1 | 4,128 | 11/24/2013 | |
1.1.0 | 3,384 | 11/15/2013 | |
1.0.5 | 2,896 | 7/1/2013 | |
1.0.4 | 2,568 | 7/1/2013 | |
1.0.3 | 2,694 | 1/10/2013 | |
1.0.1 | 2,400 | 1/10/2013 | |
1.0.0 | 4,145 | 1/9/2013 |