SlugEnt.SemVerUtil 1.2.0

dotnet add package SlugEnt.SemVerUtil --version 1.2.0                
NuGet\Install-Package SlugEnt.SemVerUtil -Version 1.2.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="SlugEnt.SemVerUtil" Version="1.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SlugEnt.SemVerUtil --version 1.2.0                
#r "nuget: SlugEnt.SemVerUtil, 1.2.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.
// Install SlugEnt.SemVerUtil as a Cake Addin
#addin nuget:?package=SlugEnt.SemVerUtil&version=1.2.0

// Install SlugEnt.SemVerUtil as a Cake Tool
#tool nuget:?package=SlugEnt.SemVerUtil&version=1.2.0                

SemverUtil

App / Library for working with Semantic Version in relation to file system / directory version folders.

For instance,say you have a folder for an app that is used to store the latest version of an app, in fact it stores multiple versions of the app (maybe for deployement): C:\apps<appName>
In that folder are folders named: Ver1.0.0 Ver1.0.1-alpha.2 Ver1.0.1-beta.4 Ver1.0.1 Ver1.2.0-rc.3

The SemVerUtil class allows you to work with those versioned folders as follows:

		FileSystem fileSystem = new System.IO.Abstractions.FileSystem();
		SemVerUtil semVerUtil = new SemVerUtil(fileSystem);
		semVerUtil.Initialize(@"C:\apps\appname","Ver")
		FileSemVer fileSemVer = semVerUtil.DirectoryMostRecentVersion();
		Console.Writeline("Most Recent: " + fileSemVer.Version);

Will output: Most Recent: 1.2.0-rc.3

		List<FileSemVer> versions = semVerUtil.DirectoryNewestVersions(4);

Will return the 4 most recent versions in descending order: Ver1.2.0-rc.3 Ver1.0.1 Ver1.0.1-beta.4 Ver1.0.1-alpha.2

Check Out the Tests for more functional examples

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.0 302 10/12/2023
1.1.0 639 6/7/2021
0.1.1-fix0005 649 1/1/2021
0.1.1-fix0003 553 12/30/2020
0.1.1-fix0002 586 12/30/2020
0.1.1-fix0001 586 12/30/2020
0.1.0 746 12/6/2020
0.1.0-InitialBuild0006 616 12/6/2020
0.1.0-InitialBuild0003 568 11/30/2020

Update To Net 7 and latest packaages