Wednesday, May 28, 2008

Visual Studio 2008, TFS and VisualSVN

In the organization I work for most of the development has been done in Java and therefore a lot of the IT personnel are unix/linux experts. In my group we are developing in .NET 3.5 and VS2008 using TFS as our development core system. I saw the possibility to move our development core system from TFS to SVN, Tracs and Cruise Control .Net and in order to start the whole process the first thing needed was to have VS2008 talk to SVN.

VS2008 can talk to SVN via Tortoise SVN but that method will not bind to VS interface as a plugin just like Team Explorer does. After reading a bunch of blogs, I found out Visual SVN (which is not free, but is cheap $49pu) and started the whole testing process and this is what we found out:

  1. The new solution files that will organize the working projects for the current project must be under svn in the root folder for all projects. Create blank solution(s) at the root of the svn-controlled directory.
  2. Manually copy each project directory from the TFS location in your hard drive to the svn location in order to have two working copies of the same project, one working with TFS and the other one working with svn.
  3. In the svn directories, delete all files with the extension .vspscc from all project directories, this is a file needed by TFS only and not needed by svn.
  4. Inside each project's directory open the corresponding project file e.g. .csproj for edit and delete the following properties: SccProjectName, SccLocalPath, SccAuxPath, SccProvider. This step will get rid of any link to TFS source control.
  5. Open the new solution and add all projects you just copied and edited.
  6. Right click the root solution and select Commit to svn, this will launch Tortoise svn and allow to commit the changes, now all traffic lights should be green.

Now that all code is under svn, Tracs will easily integrate to the project and CC.Net will also easily be deployed and connected to svn for automated builds.

I got help from these blogs which might give you more insight on MS source control settings files:

No comments: