And Drupal loses a long post... so, starting again...
I've now got a VM pretty much at the point I wanted to get it to. I've not bothered with NAnt and NUnit at this stage, although I think it would be more robust if a checkin did run an NAnt task that runs NUnit tests and the build process, rather than just pushing the checked in version straight into the working copy used for staging.
What I have got is a Virtual Machine running Mono with a skeleton Castle MonoRail project working in there. I've got a sample ActiveRecord class and a SQLite-based membership provider with a couple of pages using that and an authentication filter to verify that the visitor is logged in. This is running under XSP2 at the moment, so it's not set up for live site hosting, just for testing and staging.
As well as the skeleton project, I've got a number of other pieces in place to provide a starting point for working on a project. The Mono project's VM includes MonoDevelop, so it's set up so that you can use that to modify and build the project.
I also have RedMine set up for project tracking. It's not got as much functionality as some of the commercial project tracking tools, but it's certainly one of the more friendly to use and powerful open source ones.
I'm pondering what to do with the VM in terms of whether to make it available for others to use, and what to do with the Getting Started documentation for Castle MonoRail which I've been putting together along the way, but in the meantime, I can cover some of the gotchas I've run into:
Firstly, RedMine. The performance after I followed their installation instructions was horrible. Truly awful. Now, I don't know if that was something to do with Webrick vs Mongrel, some other ruby settings I don't know about, or what, but fortunately there's an easier way. For my second try I installed the Bitnami Redmine stack, which is a package with Apache, Ruby, MySQL, etc, all set up by an installer. This gave much better performance, and so I'm using that in this VM.
Next up, serving pages externally. I was slightly confused for a while by none of the pages being available from other machines despite the VM being pingable and indeed the Apache instance running on port 80 serving OK. Turns out both Webrick (for the default install of Redmine) and XSP default to serving just 0.0.0.0, the local loopback. My initial thoughts of it being a firewall issue were therefore unfounded, and the Bitnami stack serves on all ports and using the --address parameter when starting XSP2 can set an IP address to listen on, so that was straightforward to resolve.
Next, the GIT setup presented one main challenge. Installing GIT was easy. Working out the parameter to use to check out from the repository perhaps a little less so (I was expecting a more FTP-like format), but where I got most stuck was setting up the hooks. I looked up how to set up hooks, and set up a post-receive one, and this then didn't seem to work. I could run the hook manually and it worked, so it seemed very odd. It turns out that GIT_DIR is being set when hooks are run, and then trying to do most git actions will then be looking at the wrong folder when trying to run their actions. Instead of git reset --hard, I needed to use env -i git reset --hard, to unset the variables that were getting in the way.
As for Mono and MonoRail, they were generally less of a problem than the rest of the setup, which is good. The bundled System.Data.SQLite.DLL didn't seem to work, so I ended up grabbing the current managed-only one from its project website. This got the SQLite membership provider working. The ActiveRecord configuration wasn't too bad, the main trick being that there's 2 driver/provider settings for SQLite, and the plain SQLite one is for a different DLL, while the SQLite20 one is the one you actually need (which I presume is referring to it being an ADO.NET 2.0 provider, since that's what you'd use for SQLite 3.0 databases).
I found it easiest to copy the DLLs I needed into the Bin folder and then add references to there, if only to ensure that the project was trying to load DLLs from there rather than looking at external files which may well not be present on a checked out machine or the like.
The implementation of security using a location section in the web.config didn't work, either. It was just ignored. What does work is either using a filter and using getUser to get the current login status and responding accordingly (which is what I've done with a custom authenticationFilter), or you can set up physical folders and put a web.config in there with just the authentication settings you need, which while functional (and avoids recompiling code to make a security change), doesn't fit so well with the controller/actions setup as those folders would not be necessary otherwise, and doesn't neceessarily give enough control on security for individual pages.
There were also the usual tricks with making sure that you had the right cases for files, since it's then working on a case-sensitive machine, and this affects the URLs that work (whereas on Windows you can enter the action names without worrying about correct case).
Oh, and LINQ didn't work, and caused MonoDevelop to fail to build with an error in a tmp file, which was really unhelpful. It turns out the issue there was a missing dependency. I found a System.Data.Services.DLL that someone has submitted specifically to try to implement enough to get NHibernate working under Mono, and put that in. This allowed the project to build with the LINQ-related DLLs added, although I haven't tested further to see what does and doesn't work there.
I think that about covers the issues that I've run into - all resolved, at least enough to get my VM to a state where I'm happy to use it as the basis for starting on a proper project. Mono and MonoRail - it's a pretty good combination, once you work out the kinks...
The post I found about System.Data.Services is at http://lists.ximian.com/pipermail/mono-devel-list/2009-October/033284.html