In this post series I will show how one can easily set up a Continuous Integration scenario for F# or C# projects with completely free products.
“Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily – leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible.”
The first step for Continuous Integration is to set up a Source Control environment. For many good reasons I choose Subversion – some of them are:
- Atomic commits
- Rename/Move/Copy actions preserve the revision history
- Directories are versioned
- Multiple repository access protocols including HTTP and HTTPS
- There is a nice Visual Studio integration (see below)
- Last but not least: it is completely free 🙂
Source code version control with Subversion
All you need for setting up a complete Subversion environment is to download and install VisualSVN Server from http://www.visualsvn.com/.
“VisualSVN Server is a package that contains everything you need to install, configure and manage Subversion server for your team on Windows platform. It includes Subversion, Apache and a management console.”
Now you can create user accounts and a repository ”CITest” in the VisualSVN Server management console.
Subversion integration in Visual Studio 2008
Download and install AnkhSVN 2.0.x from http://ankhsvn.open.collab.net/.
“AnkhSVN is a Subversion SourceControl Provider for Visual Studio. The software allows you to perform the most common version control operations directly from inside the Microsoft Visual Studio IDE. With AnkhSVN you no longer need to leave your IDE to perform tasks like viewing the status of your source code, updating your Subversion working copy and committing changes. You can even browse your repository and you can plug-in your favorite diff tool.”
Now you can add your C#/F#-solution to your CITest-repository:
- Open the solution in Visual Studio 2008
- Open “View/Repository Explorer” and add your repository to AnkhSVN
- You can copy the URL from the VisualSVN Server management console (In my case this is https://omega:8443/svn/CITest/)
- You also have to give AnkhSVN your Subversion login
- Now click the right mouse button on your solution in the Solution Explorer and choose “Add Solution to Subversion”
Now we can modify our solution and commit our changes via “Commit solution changes” in the Solution Explorer:
We can easily control our changes via AnkhSVN’s “Repository Explorer” and “History Viewer” in Visual Studio 2008:
If we do any changes in the Program.fs file, we can see a diff via the “Show changes” functionality:
If you don’t like the default Diff tool you might try WinMerge.
Next time I will show how to set up a Continuous Integration server.
Tags: AnkhSVN, Continuous Integration, F#, Source Control, subversion, Visual Studio 2008, VisualSVN, WinMerge