https://github.com/brenordv/msbuild-task-autoincrement-version
https://github.com/brenordv/msbuild-task-autoincrement-version
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/brenordv/msbuild-task-autoincrement-version
- Owner: brenordv
- Created: 2021-03-04T01:58:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-24T19:17:36.000Z (about 4 years ago)
- Last Synced: 2025-04-02T22:22:49.866Z (2 months ago)
- Language: PowerShell
- Size: 2.93 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# MsBuild Task: Auto increment version on build
This is a script to be used on PreBuild events. It will, according to the parameters passed, update the .csproj versioning info.This script will read a csproj file and update the version info for Assembly, File and/or Package.
For now (and the foreseeable future) this script only support semantic versioning using Major.Minor.Build.Revision syntax.- The pattern for increment versioning is:
- = (equal): do not change version
- \+ (plus): increment version by one.This means that if you use: =.+.=.+ the script will update the minor version and the revision on each build.
# How to use
## Add the following in your .csproj
Consider that your script is in: ```[solution folder]\BuidTasks```
```xml
```In the snippet above, we're setting the script AssemblyVersion, FileVersion and PackageVersion to autoincrement revision number on each build.
With the exception of -projectFile flag, the rest is optional.