XploRe.Versioning.Tools.DotNet 0.3.0

This package has a SemVer 2.0.0 package version: 0.3.0+d850bc4.
dotnet add package XploRe.Versioning.Tools.DotNet --version 0.3.0
NuGet\Install-Package XploRe.Versioning.Tools.DotNet -Version 0.3.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="XploRe.Versioning.Tools.DotNet" Version="0.3.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XploRe.Versioning.Tools.DotNet --version 0.3.0
#r "nuget: XploRe.Versioning.Tools.DotNet, 0.3.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install XploRe.Versioning.Tools.DotNet as a Cake Addin
#addin nuget:?package=XploRe.Versioning.Tools.DotNet&version=0.3.0

// Install XploRe.Versioning.Tools.DotNet as a Cake Tool
#tool nuget:?package=XploRe.Versioning.Tools.DotNet&version=0.3.0

Automatic SemVer 2.0 Versioning for .NET Builds

Provides MSBuild targets that hook into the .NET build process to automatically generate a SemVer 2.0-compatible version based on the current repository revision.

Supports multiple VCS. The default implementation is compatible with common workflows such as Git/Hg Flow or GitHub Flow. Through several MSBuild injection points the process how version numbers are derived can be influenced to match custom workflows.

Usage

Configuration

Set a version prefix in your project file and define the repository type:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <VersionPrefix>1.2.0</VersionPrefix>
    <RepositoryType>git</RepositoryType>
  </PropertyGroup>
</Project>

The version prefix is expected to be of format X.Y.Z, with a major X, minor Y and patch version number Z. If the patch or patch and minor version numbers are omitted, they default to 0. Additional characters in the version prefix are ignored and will be removed automatically.

The repository type controls what VCS engine is used to retrieve further information on the repository. If no repository type is defined, the repository type is auto-detected by searching for a corresponding source control system metadata-folder in the project root folder.

Activation

To activate automated versioning, add the following package reference to the project file:

<Project Sdk="Microsoft.NET.Sdk">
  <ItemGroup>
    <PackageReference Include="XploRe.Versioning.Tools.DotNet" Version="0.3.0" PrivateAssets="All" />
  </ItemGroup>
</Project>

Setting PrivateAssets to All ensures that the package reference is used for building only and will not appear as a dependency in the NuSpec file of the project. If a tool is used to add the dependency, the PrivateAssets property should be set automatically.

During each build, the assembly and package version numbers will now automatically include a SemVer 2.0-compatible tag and build number for development and release candidate builds, as well as build metadata.

Documentation

For the full documentation please visit the repository at:
https://gitlab.com/xplo-re/dotnet/versioning.tools.dotnet

License

Released under the Apache License, Version 2.0.

Copyright © xplo.re IT Services, Michael Maier.
All rights reserved.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
0.3.0 109 4/12/2022
0.2.1 57 3/25/2022
0.2.0 51 3/18/2022
0.2.0-dev.22 208 6/17/2020
0.1.2 1,317 3/24/2018
0.1.0 894 3/23/2018