If you’re going to analyze Visual SourceSafe databases for migration to Team Foundation source control, and to migrate Visual SourceSafe databases to Team Foundation source control, you’ll eventually meet VSSConverter. VSSConverter is a command line utility that uses XML configuration files to transfer SourceSafe projects to TFS. Eyal Post of EPocalipse Software has built a GUI front-end for the VSSConverter tool, which is the command-line utility that helps you migrate source from Visual SourceSafe to Team Foundation Version Control. In this post I will describe which steps need to be taken.
Converting your projects
Before you can use VSSconverter you need to have the correct tools and rights. VSSConverter depends on Visual Studio Team Explorer, which will help you to connect to TFS and Source Control to determine its projects.
Admin password of SourceSafe
If you want to retrieve data from your SourceSafe environment, you need to have full control to do so. In some case it's necessary to hack SourceSafe, because no one remembers the password of the Admin account. Luckily you can easily overwrite the passwords for a SourceSafe environment, which are stored in the um.dat file. This file, which can be found in the root, contains all passwords of each user and are binary stored. Open the um.dat in a hexadecimal editor and try to determine the offset of your Admin account, as the file is ordered alphabetically by login. If you haven't any user name that appears alphabetically before "Admin" it will appear at offset 80. Hack the file and remove the Admin password from offset 80 the bytes are (all numbers are hex) and change the bytes to exactly what's typed below and include all bytes even the one from offset a0.
0:80 55 55 bc 7f 41 64 6d 69 6e 00 00 00 00 00 00 00 0:90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0:a0 00 00 00 00 90 6e 00 00 a8 01 00 00 00 00 00 00
You now have full access to your SourceSafe database.
Furthermore you need to have SQL Server rights and client tools to connect to the database server, else you will receive the error.
Need a connection and correct rights on SQL Server
ERROR: TF60022: Unable to connect to Microsoft SQL Server.
VSSConverter requires either SQL Express or SQL Server for migration. By default it looks for SQL Express which is installed with VS 2005 in a default configuration. For overriding the default you can specify another SQL Server.
After selecting my project source and destination the tool will give you the ability to map the users from SourceSafe to TFS. It's nice to see that only the VSS users which involves the project are given. After selecting the correct TFS users my migration still failed.
ERROR: TF60014: The username WINNT://SERVER/Mike in the user map file C:tempvssToTfsUsermap.xml is invalid.
ERROR: TF60087: Failed to initialize user mapper
I don't know why, but in mine case I needed to remove WinNT:// per user as you can see in the code below. You can do this by editing the UserMap.xml.
<?xml version="1.0" encoding="utf-8"?>
<UserMappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UserMap From="MIKE" To="SERVERMike" />
<UserMap From="ADMIN" To="SERVERTFSSetup" />
Team Foundation Server
The last step which has to be taken is give the user who migrates all projects the ability check in other users' changes security rights on TFS. If you forgot to do so this error will occur.
ERROR: TF14098: Access Denied: User SERVERmike needs Checkin, CheckinOther permission(s) for $/Playground/Source/dummy.txt.
After correcting all steps I was able to convert one of my SourceSafe projects. You could easily migrate several projects, but I think you should only migrate those which are still usable and important. All other projects can be left in SourceSafe and create a backup of it on disk or cd.
The Microsoft Team for TFS delivered a great product to really upgrade your sources to a fully transactional and more secure source control environment. It's not hard to setup a migration, but some steps are not fully documented. One of the nicest things about the migration, it will give you the ability to still see your previous history. Files checked in at the same time, will now show up as complete changeset.