Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-increment Version Number on Check-in for Team Foundation

Tags:

versioning

tfs

I would like to have all project files automatically increment the version number when a change is checked in. Is there a way to configure TFS to automatically increment on check-in or at least execute a script on the project to do it for me?

I understand that in standard practice builds usually increment the version number but this doesn't make too much sense to me as you can have 2 subsequent builds that may not have any differences at all yet the versions will be different.

like image 989
John K Avatar asked Mar 29 '11 22:03

John K


People also ask

When should you increment version number?

There are simple rules that indicate when you must increment each of these versions: MAJOR is incremented when you make breaking API changes. MINOR is incremented when you add new functionality without breaking the existing API or functionality. PATCH is incremented when you make backwards-compatible bug fixes.

How do I change the version number in Visual Studio?

Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio. Select the Configuration Properties > Linker > General property page. Modify the Version property.

Can I automatically increment the file build version when using Visual Studio?

By default, Visual Studio automatically increments the Revision number of the Publish Version each time you publish the application. You can disable this behavior on the Publish page of the Project Designer.


1 Answers

You need to get a little into the Workflow Foundation, but I used this very clear description from Richard Banks:

http://www.richard-banks.org/2010/07/how-to-versioning-builds-with-tfs-2010.html

If you know a little C# you can easily edit it to your own needs.

like image 177
Luuk Avatar answered Sep 28 '22 06:09

Luuk