Subversion & Visual Studio 2008 – Part 1

Most .NET developers would be comfortable working with Visual SourceSafe (VSS) when it comes to source control. VSS is good but there are several problems with it and with Team Foundation Server (TFS). First of all they are all very expensive, do not offer a very good disconnected model (“meaning that it is quite hard to work offline”). VSS also expects you to pretty much exclusively check out a file before working on it, making it harder for large teams to work together. Finally VSS and TFS’s automated build system are very heavy and do not really offer immediate deployment to development servers. But again that is only my opinion.
On the other hand Subversion (initiated in 2000 by CollabNet) is a very light, open-source and free alternative to VSS that requires minimal maintenance once installed and configured. A lot of large and well known organisations such as Google use Subversion. Arguably Subversion and CruiseControl.NET (CC.NET), a continuous build system, are more difficult to install and configure than VSS is. There’s more to it that just double-clicking an executable file like with VSS. Hopefully the series of articles on this subject will aim to provide you with a solid guide on how to configure them.
During this series, I will be using Virtual PC to demonstrate how to setup a Subversion server and a development machine. I will be setting up two different virtual machines, one running Windows Server 2008 RC0 Web Edition (this will host the Subversion server) and one running Windows Vista Home Premium with Visual Studio 2008 (this will be development workstation).
1. Setting up Apache Web Server on Subversion server machine
This guide assumes that you have already installed and configured successfully Windows Server 2008 (W2K8) RC0 Web Edition. Below is a screen shot of my server’s about screen.
Please note that you can use Standard Edition for this as well. As a matter of fact you do not need any of the web features of W2K8 if you are only going to use this server as a Subversion repository. I decided to use the Web Edition because I will be using this server later on in this series as a web development server.
Subversion on its own gives you access remotely to the source repository only via the custom Subversion SVN protocol (default port 3690). But you can still access your repository via the HTTP/HTTPS protocols as well, with the help of a web server. Unfortunately using IIS with Subversion is extremely difficult and almost impossible. The server of choice, recommended by Subversion developers, is Apache a free web server that can run as well on a Windows platform as it does on Linux.
So once you have W2K8 installed and configured, you will need to first install Apache on your server. You can download Apache 2.0 here. I will be using version 2.0.61. There are later versions than this but are not as stable with Subversion. There are two options here you can either download a version without SSL support or with Open SSL support. I will be using the non SSL version. If though you will be providing access to your repository remotely over HTTPS then you should install the Open SSL version. I chose to download apache_2.0.61-win32-x86-no_ssl.msi.
Once you have downloaded the Apache setup executable you can go ahead and start the setup. It is straight forward really. Just fill in your server details as in the screenshot below and then choose Typical Install.
Once the installer completes you should see a new tray icon appear and if all has gone smoothly the icon should be a green play-like icon.
You can check your server’s installation by navigating in your browser to http://localhost. If you had IIS installed prior to installing Apache there is bound to be a conflict as the default port for both is port 80. To avoid this please change the default port of IIS prior to installing Apache. You can afterwards change Apache to listen to a different port (i.e. 81).
In the next article I am going to show you how to setup Subversion to work with Apache.


7 thoughts on “Subversion & Visual Studio 2008 – Part 1

  1. >Absolutely a very valid point indeed – I am going to be reviewing that as well. Love the MMC snap-in it comes with. But to be honest I think a developer should know the under workings of installing all this stuff. But will certainly review VisualSVN Server as well.

    1. Well as it’s a work repository, it will most llkeiy stay svn for a while, or until I can encourage the team to migrate. But using git to access the repository will allow me to to fast blames, and review the teams changes, and allow merging of external development code, much more easily, while not changing the rest of the team experience.

  2. >Ok here is the deal. I hear so many say that VSS requires exclusive checkout. This is NOT true. VSS 2005 introduced a edit/merge commit model. Which means you can turn off exclusive locks on files. I manage this for my company and I works well. I like subversion but Visual Studio integration is still poor. TFS is terrible and needs a great deal of improvement. To clear it up you can turn of exclusive locks with VSS 2005.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.