MSBuild.Version.Target
4.0.147
See the version list below for details.
Requires NuGet 2.5 or higher.
dotnet add package MSBuild.Version.Target --version 4.0.147
NuGet\Install-Package MSBuild.Version.Target -Version 4.0.147
<PackageReference Include="MSBuild.Version.Target" Version="4.0.147" />
<PackageVersion Include="MSBuild.Version.Target" Version="4.0.147" />
<PackageReference Include="MSBuild.Version.Target" />
paket add MSBuild.Version.Target --version 4.0.147
#r "nuget: MSBuild.Version.Target, 4.0.147"
#:package MSBuild.Version.Target@4.0.147
#addin nuget:?package=MSBuild.Version.Target&version=4.0.147
#tool nuget:?package=MSBuild.Version.Target&version=4.0.147
MSBuild.Version.Target
π―βοΈ 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:
- Generating and maintaining a
Version.txtfile for versioning in Semantic Versioning (SemVer) format. - Automatically updating
AssemblyInfo.csandVersion.txtwith the incremented version during each build (except for theReleaseconfiguration).
π Features
- Semantic Versioning (SemVer) support:
- Major and minor versions are manually maintained.
- Build (patch) version is automatically incremented during the build process.
- Configurable via MSBuild.
- Works in CI/CD pipelines or local builds.
π¦ 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
Post-installation Setup:
After installing the package, locate theVersion.txtfile 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-
Releasebuilds.
Configuration Management:
The versioning logic activates during any build configuration other thanRelease. 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
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:
- Initial
Version.txt:1.0.0 - After a build with configuration
Debug:1.0.1 - After another
Debugbuild:1.0.2 - Build with configuration
Release:- Version remains unchanged.
π§© Contributing
Contributions are welcome!
Feel free to open issues, submit pull requests, or suggest features.
π License
This project is licensed under the MIT License.
Learn more about Target Frameworks and .NET Standard.
-
- MSBuildTasks (>= 1.5.0.235)
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 |
|---|---|---|
| 4.0.150 | 2,536 | 11/17/2024 |
| 4.0.147 | 378 | 11/17/2024 |
| 4.0.141 | 325 | 11/17/2024 |
| 4.0.138 | 328 | 11/16/2024 |
| 4.0.135 | 340 | 11/16/2024 |
| 4.0.130 | 325 | 11/16/2024 |
| 4.0.123 | 335 | 11/16/2024 |
| 4.0.120 | 319 | 11/16/2024 |
| 4.0.117 | 341 | 11/16/2024 |
| 4.0.114 | 451 | 10/28/2024 |
| 4.0.111 | 758 | 9/2/2024 |
| 4.0.105 | 363 | 8/27/2024 |
| 4.0.100 | 386 | 8/26/2024 |
| 4.0.84 | 2,008 | 6/19/2024 |
| 4.0.83 | 5,918 | 4/22/2024 |
| 4.0.71 | 2,044 | 12/14/2023 |
| 4.0.65 | 2,071 | 11/9/2023 |
| 4.0.60 | 869 | 9/23/2023 |
| 4.0.55 | 520 | 9/23/2023 |
| 4.0.52 | 515 | 9/20/2023 |
| 4.0.47 | 1,111 | 7/24/2023 |
| 4.0.46 | 546 | 7/17/2023 |
| 4.0.43 | 1,030 | 6/19/2023 |
| 4.0.39 | 656 | 6/7/2023 |
| 4.0.33 | 1,054 | 5/4/2023 |
| 4.0.32 | 455 | 5/3/2023 |
| 4.0.27 | 830 | 4/3/2023 |
| 4.0.14 | 1,342 | 1/24/2023 |
| 4.0.13 | 1,371 | 9/13/2022 |
| 3.0.60 | 1,800 | 7/26/2020 |
| 3.0.59 | 906 | 6/27/2020 |
| 3.0.52 | 815 | 6/27/2020 |
| 2.0.47 | 1,072 | 9/18/2019 |
| 1.1.44 | 1,393 | 8/21/2018 |
| 1.1.43 | 1,221 | 8/21/2018 |
| 1.1.42 | 1,213 | 8/21/2018 |
| 1.1.41 | 1,253 | 8/16/2018 |
| 1.1.40 | 1,286 | 8/16/2018 |
| 1.1.39 | 1,255 | 8/16/2018 |
| 1.1.38 | 1,293 | 8/15/2018 |
| 1.1.37 | 1,196 | 8/15/2018 |
| 1.1.36 | 1,991 | 4/25/2018 |
| 1.1.35 | 1,908 | 4/24/2018 |
| 1.1.34 | 1,888 | 4/24/2018 |
| 1.1.33 | 1,987 | 4/24/2018 |
| 1.1.32 | 1,920 | 4/24/2018 |
| 1.1.31 | 1,897 | 4/24/2018 |
| 1.1.30 | 1,908 | 4/24/2018 |
| 1.1.29 | 1,887 | 4/24/2018 |
| 1.1.28 | 1,918 | 4/24/2018 |
| 1.1.27 | 1,908 | 4/24/2018 |
| 1.1.26 | 1,889 | 4/24/2018 |
| 1.1.25 | 1,929 | 4/24/2018 |
| 1.1.24 | 1,897 | 4/24/2018 |
| 1.1.23 | 1,965 | 4/24/2018 |
| 1.1.22 | 1,919 | 4/24/2018 |
| 1.1.21 | 1,918 | 4/24/2018 |
| 1.1.20 | 1,887 | 4/24/2018 |
| 1.1.19 | 1,911 | 4/24/2018 |
| 1.1.18 | 1,938 | 4/24/2018 |
| 1.1.17 | 1,887 | 4/24/2018 |
| 1.1.15 | 1,898 | 4/24/2018 |
| 1.0.14 | 1,911 | 4/24/2018 |