MSBuild.Version.Target

🎯 Provides a NuGet package that adds functionality to your project to auto increment the version build and revision before every Debug build.


Project maintained by guibranco Hosted on GitHub Pages — Theme by mattgraham

MSBuild.Version.Target

Wakatime Build Status NuGet Version NuGet Downloads CodeFactor

πŸŽ―βš™οΈ 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:


πŸš€ Features


πŸ“¦ Installation

To install the NuGet package, use the following command:

Install-Package MSBuild.Version.Target

Or visit the NuGet package page for more details.


πŸ› οΈ Usage Instructions

  1. 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
    
    • Major and Minor: Managed manually.
    • Patch: Automatically incremented for non-Release builds.
  2. Configuration Management:
    The versioning logic activates during any build configuration other than Release. Ensure the appropriate configuration is selected:
    • In Visual Studio, adjust this under Build > Configuration Manager.
    • In CI pipelines or manual builds, specify the configuration explicitly using:
      MSBuild /p:Configuration=Debug
      
  3. 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.

πŸ“‹ Example

Here’s a quick example of how the versioning would work:


🧩 Contributing

Contributions are welcome!
Feel free to open issues, submit pull requests, or suggest features.


πŸ“„ License

This project is licensed under the MIT License.