Provides a NuGet package that adds functionality to your project to auto increment the version build and revision before every Debug build.
🎯⚙️ MSBuild.Version.Target is a NuGet package that automates versioning by auto-incrementing the build version for non-release configuration builds.
It integrates seamlessly with your project by:
Version.txt
file for versioning in Semantic Versioning (SemVer) format.AssemblyInfo.cs
and Version.txt
with the incremented version during each build (except for the Release
configuration). To install the NuGet package, use the following command:
Install-Package MSBuild.Version.Target
Or visit the NuGet package page for more details.
Post-installation Setup:
After installing the package, locate the Version.txt
file in the Properties folder of your project. Update the file with your current project version in the SemVer format:
Major.Minor.Patch
Release
builds.Configuration Management:
The versioning logic activates during any build configuration other than Release
. Ensure the appropriate configuration is selected:
MSBuild /p:Configuration=Debug
Build Process:
During the build, the following updates occur automatically:
AssemblyInfo.cs
: The assembly version is updated to reflect the new version. Version.txt
: The build version is incremented. Here’s a quick example of how the versioning would work:
Version.txt
:
1.0.0
Debug
:
1.0.1
Debug
build:
1.0.2
Release
: Contributions are welcome!
Feel free to open issues, submit pull requests, or suggest features.
This project is licensed under the MIT License.