I'm currently setting up a build server. While I am a one man team for the websites I build, that might not always be so, and I like to make things as easy as possible. I'd also like to know how to get it going. Cue in any open source piece of software and you're bound to get your hands dirty. The following tutorial is coming from someone who knew nothing about integrating the tools that are in the title, so I had a bit of learning to get this stuff going.
The first thing I did was download CruiseControl.NET to my build machine. The install went fine, yet I had no idea where to begin. Good things there's some documentation! I read through getting everything going, and it turns out you have to modify a config file. The documentation goes over the different blocks that are available, but it was still a little confusing. In the installed "examples" directory there were a few config examples, but nothing that had my setup. This is where I encourage you to do some googling to find a config similar to yours. Here's mine below:
<cruisecontrol>
<project name="Meetandplay.com">
<webURL>http://meetandplay.com/</webURL>
<triggers>
<intervalTrigger seconds="86400" />
</triggers>
<modificationDelaySeconds>10</modificationDelaySeconds>
<!-- SVN to the MNP directory -->
<sourcecontrol type="svn">
<trunkUrl>-repo directory-/repos/</trunkUrl>
<workingDirectory>-project directory-\Repos\MNP</workingDirectory>
</sourcecontrol>
<!-- Build using MSBuild (2005) -->
<tasks>
<msbuild>
<executable>C:\WINNT\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe</executable>
<workingDirectory>-project directory-\Repos\MNP\MNP</workingDirectory>
<projectFile>MNP.sln</projectFile>
<buildArgs>/noconsolelogger /p:Configuration=Debug /v:quiet</buildArgs>
<targets>Build</targets>
<timeout>15</timeout>
<logger>C:\Program Files\CruiseControl.NET\server\Rodemeyer.MsBuildToCCnet.dll</logger>
</msbuild>
</tasks>
</project>
</cruisecontrol>
I want my builds to be run every day or so, as I usually check-in once a day, if that. I also made the logging set to quiet. Not sure exactly why, but a doc said that it saved some logging space. Since I don't really need logging (I think), the less of it, the better.
The big thing that got me stuck here was the <logger> tag. I don't have the MSBuild XML Logger and in typical OSS fashion, it wasn't included with the install, and as an added bonus I couldn't find anywhere on the web to download it. The confluence website also had a few links to download it, yet all of those got the 404 error. I finally saw an "improved logger", called Rodemeyer.MsBuildToCCNet.dll that I was able to download. You follow those instructions on that site and finally that got going. Sounds simple, but just finding and doing that took 4 hours that I'm now hopefully saving you.
Now that my projects were building, I was STILL getting a failed build, even though I knew they were building ok. After reading a SGu blog post that told me that since I had a WAP project I was missing the targets file. Well, that's just what the build log said too. Sgu pointed to K. Scott Allen's blog which in turn told me how to get the .targets file copied to the server (so you don't have to install VS2005 or WAP on your server). How these people figure this crap out is anyone's guess, but I'm glad I didn't have to. After creating these directories and pasting the file, bing bing bing, the green "Success" words lit up my screen and made me feel like a winner again. Now I get to figure out the CCTray, or what looks to be cool widgets or gadgets that sit on your desktop.