Builds on my machine

These changes (plus locally approving some line-endings, etc) were required to get all the projects building (except the silverlight one, and I don't have silverlight installed, so that makes sense) and all tests passing (except the NHibernate query one, which could not connect to the in-memory connection):

If all these tests work on your machine also, I recommend merging them in.