.NET AssemblyInfo version


I use TeamCity 8.1 with subversion and I would like to use this scenario.

I have AssemblyInfo.cs with version 2.1.956.100 where first and second numbers are major and minor version, third is revision from svn and fourth is build number. Now 2.1 is configuration parameter in the TeamCity and revision and build number is generated in the TeamCity, AssemblyInfo.cs is patche via AssemblyInfo patcher in the TeamCity.
But is possible to take  AssemblyInfo.cs info from SVN, get major minor version from AssemblyInfo.cs, create version number as major.minor.revision.build, patch AssemblyInfo.cs file and commit it to svn?

1 comment
Comment actions Permalink

Hi Petr,
I'm not aware of a way that TeamCity could do this natively. You would probably have to install SVN on all your build agents and do some custom scripting (powershell or command line) which you could then make into a Meta-Runner.

On a side note, be weary of using your SVN revision as part of your build number so you don't run into the same issues as in the below topic.



Please sign in to leave a comment.