Skip to content


Migrating from Visual Source Safe (VSS) to Subversion (SVN) using VSS2SVN – Step by step

These are my notes for using the VSS2SVN tool to migrate a project from Visual Source Safe to Subversion. These notes were tested using Windows 7 32bit edition.

  1. Download and install VisualSVN Server version 1.6. It’s very important to install version 1.6 for the purposes of the migration. This version is very old but is required for the VSS2SVN application. VisualSVN luckily make all previous versions available so this is very handy.
  2. Download and install VSS2SVN.
  3. Make a copy of your SourceSafe database. This is the directory where VSS has been storing all your revision data. In this directory will be a file called “srcsafe.ini”. Don’t work with the original unless you like taking risks.
  4. Open the VisualSVN Server interface.
  5. Select “Create new user”
  6. Create a user account for yourself
  7. Right click on “Repositories” and chose “Create New Repository…”
  8. Enter a name corresponding to the name of the project you are migrating. Select “Create default structure”.
  9. I don’t get it and I don’t know why, but you must set a pre-revision property change hook. Right click your repo and choose “Properties”. Go to the “Hooks” tab, click “Pre-revision property change hook” and click “Edit”. In the textbox enter: exit /b 0
  10. Now we need to analyse your VSS repo becuase most of the time there are corruptions and VSS2SVN wont work if thats the case. From the command line enter:
    • "C:\Program Files\Microsoft Visual SourceSafe\analyze.exe" -F -V3 -D "c:\path\to\your\copy\of\the\sourcesafe\database\'data'\directory"
  11. If that step fails, your VSS database might be too corrupt to migrate (or even use)
  12. Check out a working copy of the Subversion repository you just created. From the command line enter:
    • "C:\Program Files\VisualSVN Server\bin\svn" co http://<HOSTNAME>/svn/<REPO NAME>/trunk/ c:\path\to\working\copy
  13. Now open VSS2SVN. Enter the following settings:
    1. Path to Scrsafe.ini: Enter the path to srcsafe.ini in your copy of the VSS database you made
    2. Username: The username you created in VisualSVN
    3. Password: The password you chose when creating the user in VisualSVN
    4. VSS project to use: Enter a dollar symbol ($) followed by a backslash (\) followed by the name of your VSS project as can be found using the Visual SourceSafe Explorer that comes with VSS. Eg: $\MyProject
  14. Click “Find files in source safe”. If you get an error saying a weird file like nbaaaaaa.b was not found, your VSS repo is probably corrupt and you need to run the analyse tool as mentioned above.
  15. For “Working Directory” enter the path to your Subversion working directory you created when checking out above.
  16. For “SVN path to use” enter URL of the trunk of your Subversion repositiory you created. Eg: http://<HOST NAME>/svn/repos/<REPO NAME>/trunk/
  17. Click “Migrate to subversion”
  18. Sit back; it might take a while

After you’ve migrated all your projects, it would advisable to upgrade your VisualSVN and Subversion.

Posted in Uncategorized.

17 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Bhushan says

    Thanks!! Its really very helpful and easy to follow

    • Tyler says

      Thanks so much for this! This was a life saver! The only comment I would make it is I needed to skip step 12 and use a truly empty folder as my working directory.

  2. nanjesh says

    i need help regarding migrtion from VSS to svn.
    i am stuck,i followed all the steps but i am stuck at 13 step.
    can u please help me on this

    • Steven George says

      Hi nanjesh,

      Is it the username and password part you are stuck on? In VisualSVN, try creating a new user. Give them a username and password. Then use this username and password in step 13. Hope it helps

  3. ashok says

    I need help regarding migration from VSS 2005 to SVN.
    When I clicked Migrate to subversion I got error “error while migrating project to subversion authorization failed ”

    Please Help.

    • Steven George says

      Hello ashok,

      You most likely have entered invalid credentials in step 13. Make sure you can browse to the destination Subversion repository with your web browser using the credentials that you entered at step 13. If it doesn’t work, you will need to set up an account in Subversion first using VisualSVN. In VisualSVN go to the “Users” option.

  4. ashok says

    Hello George,

    Thanks for the reply.

    Yes I am able to browse to the destination Subversion repository with web browser using the credentials. I have already created a user in VisualSVN.

  5. ashok says

    Hello George,

    One more thing in Step 13 the username and password which I am using is those which I used in VSS as it is not accepting VisualSVN credentials in Step 13.

    • rahul says

      Hello, george,

      I am fetching same problem as Ashok.
      Credential in 13 step, is of VSS not SVN.
      and I am getting same error.

      I think we have to enter svn credential somewhere. but where?
      (and also I kept VSS and SVN username & password same :-))

      • Steven George says

        I would love to help out but I wrote this in 2011 and have since deleted all traces of VSS. It sounds like you are so close. If you find the solution please do reply back so that others may benefit.

  6. Rahul says

    Can i have code of vss2svn?
    Without that, it is difficult to know why this error occurs?
    But as error says ‘authorization failed.’ I assume it requires svn credential to commit changes to svn server. (This tool is able to get latest version of vss database project, it fails only while getting previous version.

  7. Gustavo says

    Hello, I am trying to use it but after putting the username and password it says:
    Unhandled exception as ocurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quitr….
    Retrieving COM class factory….following error: 80040154

    Is this meant to be used in a 32-bit computer?

  8. Robert says

    You are using VSS6.
    You need to upgrade to VSS2005

  9. Robert says

    To everyone else who is having problem with authentication
    I solved this by downloading sources for VSS2SVN
    Then I added two textboxes for username and password for SVN repository
    In the code you need to add two lines after the line “client = New SvnClient”

    client.Authentication.DefaultCredentials = _
    New System.Net.NetworkCredential(txtSvnUser.Text, txtSvnPassword.Text)

    After that I was able to migrate VSS project into svn repository

  10. Gustavo says

    Thanks Robert, I actually fixed it by getting a 32-bit computer.

  11. Anand says

    I m also using 32 bit and vss 6.0 and getting an error

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.VisualStudio.SourceSafe.Interop, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.
    File name: ‘Microsoft.VisualStudio.SourceSafe.Interop, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’
    at VSS2SVN.frmMain.cmdSourceSafeFiles_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

    ************** Loaded Assemblies **************
    Assembly Version:
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    Assembly Version:
    Win32 Version:
    CodeBase: file:///C:/Program%20Files/NTG/VSS2SVN/VSS2SVN.exe
    Assembly Version:
    Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/
    Assembly Version:
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/
    Assembly Version:
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/
    Assembly Version:
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/
    Assembly Version:
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/
    Assembly Version:
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the section.
    The application must also be compiled with debugging

    For example:

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.