I'm working on a C#/VB.Net project that uses SVN and TeamCity build server. A dozen or so assemblies are produced by the build. I want to control the assembly versions so that they all match up and also match the TeamCity build label.
I've configured TeamCity to use a build label of
Major.Minor.{Build}.{Revision}
Where Major and Minor are constants that I set manually, {Revision} is determined by the SVN repository version at checkout and {Build} is a TeamCity auto-incrementing build counter. So an example build label would be
2.5.437.4423
What techniques would you suggest to ensure that all of the assembly versions match the TeamCity build label?
I'd suggest using TeamCity's AssemblyInfo patcher build feature:
http://confluence.jetbrains.net/display/TCD65/AssemblyInfo+Patcher
Just create your projects from VisualStudio, configure the build feature in the BuildSteps page (see http://confluence.jetbrains.net/display/TCD65/Adding+Build+Features), and as long as you keep the default AssemblyInfo.cs file, it will work.
This approach is working great for me.
Advantages:
Disadvantages:
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