I'm looking for a solution for assembly versioning as part of Continuous Integration using TFS2015 and Git as a source control.
The tricky part is that I want to increment assembly version only when the project has changed since last build.
Previously I was using TFVC, which provides API for last changeset number for a specified directory and I created powershell, that updates the assemblyversion with current changeset number only when the sources in particular project has changed since last release. I also needed to store the changeset number somewhere on the build server so I know what versions has been released.
- Is there an existing solution?
- If no, do you have recommendations?
- Should I create nuget package, that modifies csproj with custom task or powershell script or even custom build step?
- How should I increment the assembly version? Should I use buildnumber as a revision number? In such case, how would I re-release older versions?