Поделиться через


Walkthrough: Preparing to Migrate from Visual SourceSafe to Team Foundation

The Team Foundation Visual SourceSafe converter tool transfers files, folders, version history, and user information from a Visual SourceSafe database to a Team Foundation source control server. Before you move files and historical information to Team Foundation, you should analyze and make a backup copy of the database, check in as many files as possible, and understand what information cannot be transferred from Visual SourceSafe to Team Foundation.

This walkthrough describes how to prepare your Visual SourceSafe database for conversion and how to use the VSSConverter to effectively plan for the actual migration of the source.

In this walkthrough, you will accomplish the following tasks:

  • Back up your Visual SourceSafe database.

  • Identify and resolve data integrity issues in your existing database using the Visual SourceSafe Analyze tool.

  • Run the converter tool to identify potential sources of information loss.

  • Specify which Visual SourceSafe folders to migrate.

  • Create a user mapping file to map Visual SourceSafe users to Team Foundation users.

Prerequisites

To complete this walkthrough, you need the following software installed on the computer where you plan to run VSSConverter.exe:

  • Team Explorer

  • Log on to the computer by using administrative credentials

  • SQL Server Express

    Note

    By default, SQL Server Express is installed during installation of Visual Studio 2005.

  • Visual SourceSafe 2005 or later versions

  • The Visual SourceSafe database that you want to analyze. The database format must be version 6.0 or a later version. You must run the converter on the same computer as your Visual SourceSafe database to complete this walkthrough.

    Additionally, you need:

    • The administrator’s password for the Visual SourceSafe database that contains the projects that you want to analyze.

      Note

      Other users should not access the Visual SourceSafe database during the analysis process. Do not lock the database because locking prevents the converter from accessing the database for migration.

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.

Preparing the Visual SourceSafe Database

Before you transfer your source-controlled files from Visual SourceSafe to Visual Studio 2005, complete the following tasks in Visual SourceSafe.

  • Ask all database users to check in their files.

  • Create a backup copy of your Visual SourceSafe Database to migrate. For more information, see How To Back Up a Visual SourceSafe Database (https://go.microsoft.com/fwlink?linkid=51358).

  • Use the Visual SourceSafe Analyze utility to locate and fix data integrity issues in the database. For more information about how to use this tool, see ANALYZE Utility and How to: Detect and Fix Database Corruption Errors in Visual SourceSafe (https://go.microsoft.com/fwlink/?linkid=51357).

Analyzing the Projects

VSSConverter.exe is a command-line tool that requires the following input:

  • A path of the folder that contains the srcsafe.ini file for the Visual SourceSafe database under migration.

  • An XML-based file that contains settings.

  • VSSConverter.exe is stored in <root>:\Program Files\Microsoft Visual Studio 8\Common7\IDE, but it is invoked from the Visual Studio command prompt.

This walkthrough assumes that your Visual SourceSafe database is in c:\VSSDatabase.

After you have decided which projects you want to analyze, create a file to contain the settings. This file lists the projects that you want the converter to analyze.

To create the settings file for analysis

  1. Click Start, click All 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 mkdir %DriveLetter%\VSS2TeamFoundation, where %DriveLetter% is the current drive. Press ENTER.

  3. At the command prompt, type cd %DriveLetter%\VSS2TeamFoundation. Press ENTER.

  4. Type notepad settings.xml, and then press ENTER.

  5. Select Yes to create the file.

  6. Copy the following XML, where $/FolderA and $/FolderB represent the names of folders that contain the projects that you want to migrate.

    <?xml version="1.0" encoding="utf-8"?>
    <SourceControlConverter>
          <ConverterSpecificSetting>
                <Source name="VSS">
                      <VSSDatabase name="c:\VSSDatabase"></VSSDatabase>
                </Source>
                <ProjectMap>
                <Project Source="$/FolderA"></Project>
                <Project Source="$/FolderB"></Project>
                </ProjectMap>
          </ConverterSpecificSetting>
          <Settings>
           <Output file="Analysis.xml"></Output>
         </Settings>
    </SourceControlConverter>
    

    Note

    To migrate the whole database, use <Project Source="$/"></Project>.

  7. Save your changes and close Notepad.

Next, run the converter tool from the Visual Studio command prompt to analyze the project, as shown in the following steps.

The user who is performing the analysis must be a system administrator for SQLExpress. By default, the user who installs Visual Studio will receive the required permissions for SQLExpress.

After you have the migration settings file and granted system administrator rights, you can run the converter tool to analyze the project.

To analyze the project with the converter

  1. At the Visual Studio command prompt, type the following.

    VSSConverter Analyze settings.xml

  2. When you are prompted, provide the Visual SourceSafe administrator password.

    The converter tool displays the status of the preconversion analysis. When it is completed, it generates a report (VSSAnalysisReport.xml) and a user mapping file (usermap.xml), and saves them in the current directory. You can use the user mapping file to map Visual SourceSafe users to Team Foundation users. For more information, see How to: Edit the Source Control Migration User Mapping File.

Next Steps

You can now migrate the information in your Visual SourceSafe database into the Team Foundation source control server. For more information, see Walkthrough: Migrating from Visual SourceSafe to Team Foundation.

See Also

Tasks

Walkthrough: Migrating from Visual SourceSafe to Team Foundation
How to: Create a Settings File for Source Control Analysis and Migration

Other Resources

Team Foundation
VSSConverter Command-Line Utility for Source Control Migration