GmodNET.VersionTool.Core 2.1.0

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

// Install GmodNET.VersionTool.Core as a Cake Tool
#tool nuget:?package=GmodNET.VersionTool.Core&version=2.1.0

GmodNET Version Tool

MSBuild Target NuGet Link Class Library NuGet Link CLI Tool NuGet Link

A git-based Semantic Versioning 2.0.0 compatible version number generator.

Description

GmodNET Version Tool generates a version number of the form [FullVersion]+codename.[codename from version JSON file].head.[git head name].commit.[hexadecimal representation of git commit hash].[any additional metadata provided in a "Version" key-value pair of the version JSON file] based on the version file and git repository state.

Version file is a JSON file containing key Version with corresponding value being a Semantic Versioning 2.0.0 compatible version base (initial part of the resulting version) and optional key Codename.

For example, given that repository HEAD points to NewFeature branch and version file

{
  "Version": "0.6.0-beta.1"
}

the resulting version will be equal to

0.6.0-beta.1.943586.NewFeature+head.NewFeature.commit.a3455d90049f17b6ac3bbc54177cfb51b0803851

or given that git HEAD points to master branch and version file

{
  "Version": "1.0.0+bugfix14",
  "Codename": "Ural"
}

the resulting version will be equal to

1.0.0+codename.Ural.head.master.commit.e796d2d62d39256f9c3e55b3648cd2bfb289e7bc.bugfix14.

You can read about version number generation in more detail in the Version Tool specification.

Usage

The most straightforward way to use GmodNET Version Tool with .NET projects is to consume GmodNET.VersionTool.MSBuild NuGet package. Just add package reference and specify version file to use by adding similar ItemGroup to your MSBuild project:

<ItemGroup>
  <PackageReference Include="GmodNET.VersionTool.MSBuild" Version="2.0.0" PrivateAssets="All"/>
  <VersionFile Include="../version.json" />
</ItemGroup>

GmodNET.VersionTool.MSBuild will automatically generate version number and set Version and PackageVersion properties for each build.

GmodNET.VersionTool.SourceGenerator is a C# Source Generator, which provides functionality similar to GmodNET.VersionTool.MSBuild, but embeds build version information directly as C# code.

There is a cross-platform .NET command line tool implementation of GmodNET Version Tool: GmodNET.VersionTool. It can be used from shell or any other build systems like make, cmake, etc.

GmodNET.VersioTool.Core is a NuGet package containing .NET Standard 2.0 class library which can be used to generate version numbers from other .NET applications.

Product 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.  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. 
.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 was computed. 
.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. 
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
2.1.0 2,674 11/25/2021
2.0.0 306 7/11/2021
1.0.1 420 12/26/2020
1.0.0 423 12/26/2020