AssemblyFile Checkout/Checkin

Feb 11, 2014 at 9:07 PM
Is it possible to have the AssemlyInfo task perform the checkout/in of the AssemblyInfo file or do we need to rely upon the InvokeProcess activity to do this?


It is nice that the activity will allow me to increase the version number but unless I have that change saved the same version will be built over and over again.
Feb 12, 2014 at 3:53 PM
The same could be said for the TFSVersion activity

Feb 12, 2014 at 6:08 PM
I would like to decline this request after reading the documentation provided by the ALM Rangers.
Avoiding Source Control Operations in Versioning
It is disappointingly common to see a build process checking out many versioning files, typically AssemblyInfo.cs, during the build process, incrementing the AssemblyFileVersion attribute and then checking in the files. By ‘versioning files’ we mean those files which contain the versioning attributes. For example:


There are several downsides to this approach:

• It takes time, code and effort to perform these operations.
• The developer needs to ensure that they use NO_CI in the check-in comment so as not to trigger Continuous Integration (CI) builds.
• Depending on the source control structure and frequency of builds, the history over the source control tree might be littered with these version control changesets.
• You will have to deal with unnecessary merge candidates.
• You should be able to distinguish between a build that is built on a build server and one that is built on a developer’s machine. By updating the AssemblyInfo.cs file as it is stored in version control, you could lose the distinction.

Version control is not about ensuring that your AssemblyInfo.cs files in source control have the correct versions. Rather, version control ensures that the build output is correctly versioned and can be correlated to a build. Your versioning should not be determined by the contents of your versioning files, but rather based on the robust revision logic
Marked as answer by mikeFourie on 2/13/2014 at 7:06 AM