I am at present setting up my ASP.NET MVC 4 web application with publish profiles and the associated publishing features. My continuous integration (CI) environment is Team Foundation Server (TFS) build 2010 and TFS for source control.
I have a number of requirements that I would like to achieve with this. Firstly, each time I create the publish package for release, I would like the build number to be incremented and revision number reset to 0 in my version file. I currently have one version file that contains the version number of Major.Minor.Build.Revision
. So I would like the creation of the publishing package to do such. Is this possible and if so how is it achieved? Note as this increments the version file, as part of this process I would like this checked in to source control.
My second question is that each time a developer checks in to the TFS build server, the revision number will get incremented or at least changed to a new value. I had hoped to update my build template to achieve this, but unfortunately due to restrictions on my build server I can not incorporate any custom activities on it. So I am looking to perform this task with MSBuild. Is it possible to achieve what I outlined here with MSBuild and if so, could I get an explanation please?