MSBuild.Version.Target

A build target that increments AssemblyInfo version as a SemVer pattern.


Keywords
MSBuild, auto, automatic, automaticly, build, target, targets, version, auto-increment, dotnet, dotnetframework, nuget, package, semver, version-manager
License
MIT
Install
Install-Package MSBuild.Version.Target -Version 4.0.71

Documentation

MSBuild.Version.Target

wakatime Build status MSBuild.Version.Target NuGet Version MSBuild.Version.Target NuGet Downloads

Maintainability Test Coverage CodeFactor

Provides a NuGet package that adds functionality to your project to auto-increment the version build before every non-release configuration build.

This package adds a Version.txt with the SemVer version (you must update the major and minor versions manually, only the build is updated via this functionality).

The target updates the AssemblyInfo.cs and the Version.txt of the installed project after each build that is not with the Release configuration.


Installation

Nuget package: https://www.nuget.org/packages/MSBuild.Version.Target

Install-Package MSBuild.Version.Target

Instructions

After installation, open Properties > Version.txt and update the file to match your current project version (SemVer like Major.Minor.Patch, as Patch is the Build incremental).

The configuration mentioned above is the configuration passed to the MSBuild call of a project being built. This can be set by the Visual Studio in the Configuration Manager or in a manual/CI building passing the arguments /p:Configuration=Debug (for a Debug build). This means that any value different from Release will activate this tool in the build process.