Monday, March 9, 2009

Continuous Integration Server Configuration

There are a few simple steps to set up a build server, but I always forget how and where I found the answer on the few problems that always pops up.

Here are the steps for building .NET 3.5 web-projects on a Windows 2008 server (using NAnt and NUnit):

Install:
  1. NAnt
  2. NUnit
  3. NCover
  4. NCoverExplorer (for fancy unit test coverage reports)
  5. .NET 3.5 Framework SDK
  6. CruiseControl.NET (or TeamCity)
Some special handling after installation:
  1. Open NAnt.exe.config and change the sdkInstallRoot value to a correct path.
    <readregistry
        property="sdkInstallRoot"
        key="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.1\WinSDKNetFxTools\InstallationFolder"
        hive="LocalMachine"
        failonerror="false" />
  2. Create the C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications folder and copy the Microsoft.WebApplication.targets file from a computer with Visual Studio installed. (Used by Web Application Projects)