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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With