What the build machine actually does
I've written about the build machine quite a lot, without mentioning exactly what it does. So here's the list:

After a successful build

After an unsuccessful build
- Creates an "is running" file to use as a marker - this is checked at the end.
- Overwrites the CSS file used by the HTML results page to show blue (to indicate running).
- Removes all files generated by the last build.
- Creates source and target directories.
- Gets the latest version of all source code, XML schemas, database scripts and test data into the source directory.
- Compiles all the .csproj projects found anywhere under the source directory.
- Copies the compiled assemblies to the target directory.
- Copies the resource assemblies for the menu generator to the target directory.
- Restarts the databases on the build machine and demo server.
- Deletes the existing databases.
- Runs the database script runner utility to create the databases.
- Runs the TSQLUnit tests using osql.
- Runs the unit tests on all the assemblies in the target directory.
- Generates an error if any tests have failed.
- Deploys the website to the demo server.
- Zips up debug and release files created by the build.
- Copies the zip files into the archive directory.
- Generates code documentation from the XML comments.
- Changes the colour to green or red, depending on success of the build.

After a successful build

After an unsuccessful build