.NET Continuous Integration Servers
It seems like I spend a lot of time on this blog talking about Continuous Integration
Well, in my new job one of first my tasks was to setup a CI server. Instead of using CruiseControl.NET again I decided to spend some time investigation other .NET alternatives. The idea was to see whether there was not as easier way to setup the CI environment. I've long wanted to investigate Team Foundation Build and I've also heard some great things about JetBrains TeamCity - the makers of my favourite IDE tool ReSharper!
I started out with TFBuild as it comes out-of-the-box with any Team Foundation Server setup. Setting up the build configuration was easy enough but I however soon ran into problems when wanting to integrate our NUnit test results. After some research I discovered some workarounds for making it think that the NUnit test results were MSTest runs, but soon got discouraged with the nature of the work involved to get this work. It seems that TFBuild is currently very much oriented towards supporting the default Microsoft toolset. If this fits your development scenario, then look no further.
Putting TFBuild on ice, I moved onto TeamCity and was pleasantly surprised by how easy it was to get a basic build up and running. The integrated NUnit support works great and the cool statistics graphs makes for some real pleasant viewing.
I'm also very impressed with the build portal site as it makes very effective use of AJAX to give you up-to-date information on what's happening with your builds. After getting a basic continuous build in place, I moved onto trying to get a daily build working with TeamCity. This turned out to bit a more challenging though. Our daily build includes the versioning of the assemblies and it also labels the repository with the build number created. Unfortunately TeamCity doesn't currently support the checkout-on-agent functionality for Team Foundation Server. As TeamCity does not create a workspace on the build agent, you are not able to do these kinds of TFS source control related operations as part of your builds. There is a feature request for adding this in the future (please vote for it), but for now you have to live with this limitation.
Having been impressed with the overall power of TeamCity I was not ready to give up on TeamCity yet and decided to see whether it was not possible to add the missing piece of functionality. The idea was to let TeamCity invoke a custom MSBuild task on the build agent as part of the daily build to create a workspace, get the changes into the workspace and then also checkin and label the repository. After some research and a night of development I was able to complete the MSBuild task and I'm happy to report that it is now working fine.
Overall I'm very impressed with the functionality provided by TeamCity and we will be using this as our future .NET CI server. The next version will include support for integrating FxCop results out-of-the box, but it is also easy enough to integrate external tools like FxCop, NCover and NDepend through adding the build outputs of these tools as artifacts to a build. For more information on this have a look at the posts made by Laurent Kempé.