VOOZH about

URL: https://www.nuget.org/packages/semver/

⇱ NuGet Gallery | Semver 3.0.0




Semver 3.0.0

dotnet add package Semver --version 3.0.0
 
 
NuGet\Install-Package Semver -Version 3.0.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Semver" Version="3.0.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Semver" Version="3.0.0" />
 
Directory.Packages.props
<PackageReference Include="Semver" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Semver --version 3.0.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Semver, 3.0.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Semver@3.0.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Semver&version=3.0.0
 
Install as a Cake Addin
#tool nuget:?package=Semver&version=3.0.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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 net5.0 is compatible.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 is compatible. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (196)

Showing the top 5 NuGet packages that depend on Semver:

Package Downloads
Aspire.Hosting

Core abstractions for the Aspire application model.

Pulumi

The Pulumi .NET SDK lets you write cloud programs in C#, F#, and VB.NET.

Aspire.Hosting.AppHost

Core library and MSBuild logic for Aspire AppHost projects.

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.

Aspire.Hosting.Azure

Azure resource types for Aspire.

GitHub repositories (56)

Showing the top 20 popular GitHub repositories that depend on Semver:

Repository Stars
babalae/better-genshin-impact
📦BetterGI · 更好的原神 - 自动拾取 | 自动剧情 | 全自动钓鱼(AI) | 全自动七圣召唤 | 自动伐木 | 自动刷本 | 自动采集/挖矿/锄地 | 一条龙 | 全连音游 | 自动烹饪 - UI Automation Testing Tools For Genshin Impact
LykosAI/StabilityMatrix
Multi-Platform Package Manager for Stable Diffusion
microsoft/aspire
Aspire is the tool for code-first, extensible, observable dev and deploy.
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
6over3/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!
BedrockLauncher/BedrockLauncher
WolvenKit/WolvenKit
Community Mod editor/creator for REDengine games.
Whisparr/Whisparr
Reaparr/Reaparr
Plex downloader that brings content from any server to yours!
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
VolcanicArts/VRCOSC
A modular node-programming language, program creator, animation system, toolkit, router, and debugger made for VRChat
aspose-words/Aspose.Words-for-.NET
Aspose.Words for .NET examples, plugins and showcases
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.
LANCommander/LANCommander
Version Downloads Last Updated
3.0.0 18,525,377 10/23/2024
3.0.0-beta.2 1,141 9/29/2024
3.0.0-beta.1 61,790 8/21/2023
3.0.0-beta.0 7,292 5/7/2023
2.3.0 12,261,917 2/21/2023
2.3.0-beta.0 3,025 12/28/2022
2.3.0-alpha.0 9,259 7/17/2022
2.2.0 2,542,578 6/12/2022
2.2.0-rc.0 1,759 5/15/2022
2.1.0 9,992,000 3/19/2022
2.1.0-rc.1 711 3/19/2022
2.1.0-rc.0 927 3/7/2022
2.0.6 8,916,280 12/28/2019
2.0.5 381,713 10/27/2019 2.0.5 is deprecated because it has critical bugs.
2.0.4 3,803,664 8/1/2016 2.0.4 is deprecated because it has critical bugs.
2.0.3 24,991 7/31/2016 2.0.3 is deprecated because it has critical bugs.
1.1.2 3,460,245 5/13/2014
1.1.1 4,683 11/24/2013
Loading failed