A couple of weeks ago I started helping some teams to set up their continuous integration servers. There are several tools and strategies you can use to accomplish this task. In our case, we decided to use MSBuild as the automation tool and TeamCity as the continuous integration server. Team City provides several features to automate the build process, but we preferred to minimize the dependencies with Team City for 2 main reasons:
- We want to be able to run the automated build process in the devs machines.
- We want to be able to use another build server.
For us, the standard build process includes:
- Running source analysis (StyleCop)
- Running code analysis (FxCop)
- Compiling (CS compiler)
- Running tests (MSTest)
- Running coverage (VS build-it coverage feature)
MSBuild only provides built-in support to compile, so for the rest of these tasks we had to do some research. A couple of weeks ago Gabi Iglesias posted about some of the spikes we did.
After research and spiking, this is the approach we finally took:
- To run StyleCop and FxCop we are using MSBuild Extension Pack, an open source project published at CodePlex
- To run MSTest and coverage we are using home made MSBuild tasks developed by our Engineering Excellence team (these tasks were developed back in 2008, so for our new initiative we had to update them)
In upcoming posts we will provide more details on this topic.