There are many solutions out there for Source Control and Build Servers (with Continuous Integration) - most notably (and in no particular order) Team Fortress Foundation Server, Subversion, CruiseControl.NET, and CI Factory. Each of these solutions works great - but sometimes you need something up, quick, with a minimal hit to the wallet. I'll show you how to do that today - it's very, very easy.
I'm In UR Fortress, Hold'n UR Codez
Two years ago I was hired on to a project to, in part, transition the dev team from Source Safe to Team Foundation Server. The manager of the team gave me a month and I was done in 3 days (after all the licenses), and then took another 2 days to get the CI server running. I was able to work the solution nicely, moving dependencies between branches and everyone was very happy - especially Mr. Manager since he could now enforce code policies and move tasks into TFS (out of Outlook). The teams productivity vaulted and everyone was happy.
TFS is a great solution for a corporate team (integrated workflow, task management, test integration, code policy, Sharepoint integration with reporting and metrics, etc), but if you don't have the means for a license (if you run an Open Source project for instance), you can still use a great solution set to get running in under 3 hours.
Yes, under 3 hours.
Using Subversion
Subversion is a perfect Source Control system for the independent developer /small shop /Open Source project. Not only can you store code in there - you can store just about any document or file. I use it for my code library, invoicing, and applets I don't want to lose.
Subversion Setup Made Simple - Visual SVN Server
Setting up Subversion isn't the easiest thing - especially if you want secure web access. VisualSVN Server makes this simple with a one-click installer that's free. Yes FREE. It comes bundled with Apache Tomcat and sets up your repository folder for you, then exposes it all on port 81 or 8080 (your choice - you can also set it up to use SSL).
VisualSVN gives you a GUI that works just like a DB manager, allowing you to manage all the properties of your repository, complete with security:

Using Tortoise For Client Access
Tortoise is a shell application that sits on top of Windows Explorer, allowing you to work with your repository right through Explorer. It's a very handy tool and so much has been written on it that I'm going to sidestep the description and recommend you read more here if you want.
Buy Visual SVN VS Client - It's Worth Every Penny
If you start using Subversion you'll quickly notice there's no direct tie-in to Visual Studio's source client API. The folks at Visual SVN have come up with a great solution to this: VisualSVN. It's $50 US and, in my mind, is quite the bargain.
It allows you to work pretty seamlessly in the Visual Studio environment with your Subversion server - or will create a repository for you on your hard drive if you like. I've even set one up on one of my flash drives :).
Intermission
OK - check of the clock - you've probably spent maybe 45 minutes downloading and installing. Go grab a cold beer - we're almost done :).
All set? Ok...
Build Server Time
Usually when bringing up Continuous Integration and Build Server, people begin groaning as they imagine drowning in a sea of configuration, broad-sided by XML rogue waves.
The only time I've ever set up a CI server easily was using TFS - but that still involved moving target files around and all kinds of configuration - but it wasn't that hard and we were up and running in a day or so.
Harman tipped me off to TeamCity by JetBrains (the ReSharper guys), and I thought I'd give it a try since, well, it's FREE.
I didn't have a CI solution for SubSonic and needed one badly, so I downloaded it, clicked "run" - it asked me a few questions, and boom - it was up and running. Nice!
But that's the easy part. Configuring your project... that's another story. Isn't it?
Nope...
The setup for SubSonic took me, literally, 20 minutes. It goes like this:
- Give your project a name, description, etc
- Point TeamCity to your project's trunk in Subversion (doesn't have to be the same server - ours is up at http://subsonicproject.googlecode.com/svn/trunk/). You give it your repository login (if needed) so it can check out your project files, and that's it.
- Choose your build type. They make this insanely easy for Visual Studio users - just point to your .sln file (since that's the build file for your solution). You tell TeamCity where to drop the files on your hard drive when it pulls from Subversion, and then tell it the relative path to the .sln file, and you're done.
- Set the build trigger. By default this is set to poll your repository every minute - throttle as needed. If it detects a change go in, the source is updated and rebuilt.
- Dependency settings - tell TeamCity where to pull any dependency DLLs or artifacts when it's building.
- The rest are optional.
Did I mention this is free?
Add your users, setup your mailer settings, and you're off! TeamCity will run whenever you do a COMMIT to your source, and will pull the comments and user out (each user is tied to a Subversion account). There's so much that it does - all I can say is to go have a look at it. JetBrains did some amazing work here.
But Wait, There's More!
You can setup all kinds of tools and notification things - just like CC.NET. My favorite is the VS integration - it let's you see what's happening on the server at all times. There's also a tray tool to let you know what's happening and an RSS feed:
The really neat thing about the VS plugin is that it allows you to run PRIVATE BUILDS. This is very cool - so you can "pre-run" a build to see if your checkin will break anything. If it doesn't - it will commit the change for you and then run the test. Very cool indeed.
Time Check
All in all you should be approaching 3 hours by now. The best part is the work to set this all up takes about 2 hours - playing with TeamCity (which is fun) takes up the last hour :).
There are all kinds of plugins and test runners to set up - so do check it out. It's free for Professional Use and Open Source - which is very nice.
Summary
Getting yourself setup with this kind of system is very handy, and can save you a lot of time. If you don't have the option to go TFS, do check these tools out!
