Walkthrough: Migrating from Visual SourceSafe to Team Foundation

This walkthrough describes how to migrate from Visual SourceSafe to Team Foundation using the VSS converter tool, VSSConverter.exe. For information about how to prepare the database for migration, see Walkthrough: Preparing to Migrate from Visual SourceSafe to Team Foundation. In that walkthrough you will find detailed information about how to prepare a SourceSafe database and user list for migration to Team Foundation and gain a better understanding of how the migration process works.

In this walkthrough, you will accomplish the following tasks:

  • Modify the settings file to specify which folders to migrate.

  • Run the converter to migrate the source from Visual SourceSafe to Team Foundation and generate a migration report.

Prerequisites

Before you try to complete this walkthrough:

  • Perform all steps as outlined in Walkthrough: Preparing to Migrate from Visual SourceSafe to Team Foundation.

  • Identify empty folders in Team Foundation source control where you want to migrate your Visual SourceSafe folders. If the destination folder does not exist, the converter will create it for you. The only exception is if the destination folder is a team project. The destination folder should be either a valid team project or a subfolder of a valid team project. For more information, see How to: Create a Team Project.

Additionally, you need:

  • A Team Foundation Server name.

  • You must be a member of the Team Foundation Administrators group.

  • Install SQL Server Express on the computer where you plan to run the converter.

    By default, SQL Express is installed when you install Visual Studio 2005.

    You must have administrative permissions to connect to a SQLExpress database to use the converter tool.

  • Visual SourceSafe 2005 on computer where you run VSSConverter.

Required Permissions

To perform this walkthrough, you must have administrative permissions for the Visual SourceSafe database that you will migrate. For more information, see How to: Assign Project Rights. You must also be a member of the Team Foundation Administrators security group on Team Foundation Server. For more information, see Team Foundation Server Permissions. You must also be a member of the sysadmin server role for SQL Express. By default, you are a member of the sysadmin server role if you are a member of the Administrators security group on the computer where SQL Express is installed. For more information, see "sysadmin" (https://go.microsoft.com/fwlink/?LinkId=60405) in the SQL Server 2005 documentation.

Migrating SourceSafe Project Folders

Before you continue with the actual conversion, customize your settings file to include the destination folders for the SourceSafe projects that you specified when you prepare for conversion. You must complete all the steps as outlined in Walkthrough: Preparing to Migrate from Visual SourceSafe to Team Foundation to complete this task.

To modify the settings file to create a migration file

  1. Click Start, click Programs, point to Microsoft Visual Studio 2005, point to Visual Studio Tools, and then click Visual Studio 2005 Command Prompt.

  2. At the command prompt, type cd %DriveLetter%\VSS2TeamFoundation. This folder was created when you analyzed the Visual SourceSafe database for migration. For more information, see Walkthrough: Preparing to Migrate from Visual SourceSafe to Team Foundation.

    Note

    Ensure that the system drive has sufficient space to hold the largest file size under migration.

  3. Save the settings file that you created for the analysis, settings.xml, with a new name, for example, migration_settings.xml.

  4. At the command prompt, type notepad migration_settings.xml, and then press Enter.

    The settings.xml file you created when you analyzed your database for migration is displayed in Notepad.

  5. Change the settings file as follows.

    • In the <ProjectMap> section, for each Visual SourceSafe folder that you are migrating, add the destination folders in Team Foundation source control. Use the following format, adding the Destination section as shown in the following example.

      <Project Source="$/FolderA" Destination="$/Team_Project"></Project>
      

      To migrate everything in your Visual SourceSafe database, insert the following XML instead.

      <Project Source="$/" Destination="$/Team_Project/"></Project> 
      
    • Under the <Settings> section, add a <TeamFoundationServer> section, and specify the name, port, and protocol for the Team Foundation Server to which you are migrating. Use the following format.

      <TeamFoundationServer name="TFS_server_name" port="port_number" protocol="http"></TeamFoundationServer>
      

      For example,

      <TeamFoundationServer name="AdventureWorks" port="8080" protocol="http"></TeamFoundationServer>
      

      Note

      If you have a large Visual SourceSafe database, your migration may fail because of the 4-GB limit of SQLExpress. To resolve this, you can either migrate a partial history as described in How to: Migrate a Partial History Using Archives in Visual SourceSafe, or set the converter to use SQLServer instead by adding the following line: <SQL Server="SQL_Server_name"></SQL>

  6. Remove <Output file="Analysis.xml"></Output> from the <Settings> section, or rename the output file to "migration_Analysis.xml".

    Your migration_settings.xml file should resemble the following:

    <?xml version="1.0" encoding="utf-8"?>
    <SourceControlConverter>
          <ConverterSpecificSetting>
                <Source name="VSS">
                      <VSSDatabase name="c:\VSSDatabase"></VSSDatabase>
                      <UserMap name="c:\Migrate\Usermap.xml"></UserMap>
                </Source>
                <ProjectMap>
                      <Project Source="$/FolderA" Destination="$/TeamProjectA"></Project>
                      <Project Source="$/FolderB" Destination ="$/TeamProjectB/ProjectB"></Project>
                </ProjectMap>
          </ConverterSpecificSetting>
          <Settings>
                <TeamFoundationServer name="server_name" port="port_number" protocol="protocol"></TeamFoundationServer>
          </Settings>
    </SourceControlConverter>
    

    Be sure to substitute your server name for server name and an actual port number for port number.

  7. Save your changes and close Notepad.

To run the converter

  1. Copy your Visual SourceSafe database to a local folder on the computer on which you want to run analysis and migration. Although you can migrate a Visual SourceSafe database in a shared folder on a remote computer, the migration takes much longer to finish.

  2. Click Start, click All Programs, point to Microsoft Visual Studio, point to Visual Studio Tools, and then click Visual Studio Command Prompt.

  3. At the command prompt, type the following.

    VSSConverter Migrate migration_settings.xml

    Tip

    Use the /? switch to view the available command-line options.

  4. Type Y to confirm the migration.

    The converter tool displays the migration status. When the conversion process is finished, the tool saves a migration report in the current directory. You can use Internet Explorer to view the file for more information.

  5. When you are prompted, provide the password for the Visual SourceSafe admin user.

  6. Note   VSSConverter does not migrate version control bindings for solutions. You must change these bindings manually. For more information, see How to: Migrate Source Control Bindings from Visual SourceSafe.

See Also

Tasks

How to: Create a Settings File for Source Control Analysis and Migration

Concepts

Introduction to Team Foundation for Visual SourceSafe Users

Other Resources

Team Foundation
VSSConverter Command-Line Utility for Source Control Migration