Sunday, April 21, 2013

How to Automate Builds with TeamCity

This is a multi-part, step-by-step guide, on how to automate builds in TeamCity CI Server. The original post is very detailed and extensive, so I have decided to break it down into smaller posts that you can check according to your needs.

This series is part of several other articles I have published about continuous integration. TeamCity is one of the favourite CI platforms for professional developers. It is accessible to everyone, supports most of the latest technology stacks, it is user-friendly and relatively easy to configure.

I have used TeamCity CI Server over the last few years for both large and small scale solutions, and both for professional and personal projects, with very good results, and I would like to share some of the knowledge I have acquired. Additionally, I have been getting requests from my readers to publish step-by-step articles about how to configure and use TeamCity CI server on real-life scenarios. I hope this series can help you as much as possible.

The process of automating software builds is known as continuous integration, where developers are able to regularly marge and build the changes made to a software solution.

Software Notes: for the examples related to these articles, I have used ASP.NET MVC 4.0, Visual Studio 2012 on a Windows 8 developer machine,  Subversion with TortoiseSVN, and TeamCity 6.5 (build 17795) on a Windows Server 2008 R2 server machine.

Follow the links for the full article on each of the steps:

Make sure to check my post on fixing MSBuild issues with Visual Studio 2012 solutions, in case you run into similar issues. It might save you a lot of time.

I’ll be publishing follow up detailed articles covering unit test automation and continuous deployment in the upcoming weeks.

I invite you to take a couple of minutes to leave your comments. There are many people that benefit from you sharing your experiences, and I also want to know if this articles help you, or if you got any issues following them.


  1. It is always good to see well-written, illustrated guides. I'm currently hunting for a good way to share global settings over numerous build configurations, so that when it comes time to change them I can make one edit (rather than having to open up every configuration). Any advice?

    1. Hi David. Thanks for stoping by. In TeamCity you can create templates and share them across build projects. You can make the global parameters part of it so all builds share them. Hope that helps.

  2. Very well explained and illustrated step by step. Hope to see similar article on database auto build and deployment using TeamCity soon.
    Thank you for sharing your knowledge.

  3. Hi Anthony, Thanks, finally I got a tutorial which make sense otherwise its all so distributed, i was turning crazy. I just have one issue, my build agent, it is showing either disconnect or incompatible. Any inputs on this will be helpful, thanks again :)