{"id":1264,"date":"2012-08-02T16:00:00","date_gmt":"2012-08-02T14:00:00","guid":{"rendered":"http:\/\/blog.eweibel.net\/?p=1264"},"modified":"2025-05-05T08:15:26","modified_gmt":"2025-05-05T06:15:26","slug":"migrate-a-vss-repository-to-tfs","status":"publish","type":"post","link":"https:\/\/blog.eweibel.net\/?p=1264","title":{"rendered":"Migrate a VSS repository to TFS"},"content":{"rendered":"<p>Recently I had to migrate parts from a <a href=\"http:\/\/msdn.microsoft.com\/library\/ms181038%28VS.80%29.aspx\" target=\"_blank\" rel=\"noopener\">Microsoft Visual SourceSafe 2005<\/a> repository to a <a href=\"http:\/\/www.microsoft.com\/visualstudio\/en-us\/products\/2010-editions\/team-foundation-server\/overview\" target=\"_blank\" rel=\"noopener\">Microsoft Team Foundation Server 2010<\/a> repository. In this blog post I show what I had to do and what the pitfalls were.<\/p>\n<p><strong>The tool<\/strong><\/p>\n<p>To migrate a repository you have at least two possibilities: Migrate the latest snapshot or the whole history. Normally you prefer a migration of the whole history, so you don&#8217;t loose the gained advantage of an version control system.<\/p>\n<p>To migrate a repository from Visual SourceSafe (VSS) with the complete history, there exists a tool, which comes with Visual Studio: vssconverter.exe. You find the tool in the following directory: C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE.<\/p>\n<p>To migrate a repository or just a part of it from VSS to Team Foundation Server (TFS), you have to process two steps: Analyse and Migrate.<\/p>\n<p>There is quite a good documentation about the process and the tool itself at the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms253060%28v=vs.100%29\" target=\"_blank\" rel=\"noopener\">MSDN<\/a>.<\/p>\n<p><strong>Analyse step<\/strong><\/p>\n<p>In the Analyse step the VSSConverter tool checks if there are any problems and creates an user mapping file.<\/p>\n<p>To start the analyse step, you have to enter the following at the command line:<\/p>\n<p>vssconverter.exe analyze analyzesettings.xml<\/p>\n<p>The analyzesettings.xml file looks like the following:<\/p>\n<div id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:9e37adee-33fb-4c54-b2c9-a31471e0aabd\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px; display: inline; float: none; padding: 0px;\">\n<pre class=\"brush: xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n&lt;SourceControlConverter&gt;\n&lt;ConverterSpecificSetting&gt;\n     &lt;Source name=\"VSS\"&gt;\n          &lt;VSSDatabase name=\"\\\\server\\vss\"\/&gt;\n          &lt;UserMap name=\"Usermap.xml\"\/&gt;\n     &lt;\/Source&gt;\n     &lt;ProjectMap&gt;\n          &lt;Project Source=\"$\/Project\/Scripts\/Func\"\/&gt;\n          &lt;Project Source=\"$\/Project\/Scripts\/Proc\"\/&gt;\n          &lt;Project Source=\"$\/Project\/Scripts\/Trig\"\/&gt;\n          &lt;Project Source=\"$\/Project\/Scripts\/View\"\/&gt;\n     &lt;\/ProjectMap&gt;\n&lt;\/ConverterSpecificSetting&gt;\n&lt;Settings&gt;\n     &lt;Output file=\"AnalysisReport.xml\"\/&gt;\n&lt;\/Settings&gt;\n&lt;\/SourceControlConverter&gt;<\/pre>\n<\/div>\n<p>The result of the execution of the command line are two files: Usermap.xml and the AnalysisReport.xml. You can open the AnalysisReport.xml to see if there are any problems. The Usermap.xml file you have to modify before you can continue with the next step.<\/p>\n<p>In the user mapping file (Usermap.xml) you map the VSS users to the users you use with the TFS. This file looks like the following:<\/p>\n<div id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:32de3a2b-2139-4a8c-be67-c6b7211ecdc8\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px; display: inline; float: none; padding: 0px;\">\n<pre class=\"brush: xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n&lt;UserMappings xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\"&gt;\n  &lt;UserMap From=\"michael\" To=\"DOMAIN\\michael\"\/&gt;\n  &lt;UserMap From=\"john\" To=\"DOMAIN\\john\"\/&gt;\n  &lt;UserMap From=\"ADMIN\" To=\"DOMAIN\\michael\"\/&gt;\n&lt;\/UserMappings&gt;<\/pre>\n<\/div>\n<p>I had some troubles here with the correct domain name. The problem result that the user mapping didn&#8217;t work during the migration and all history entries had me as user. So I had to destroy the migrated items in the TFS repository with the following command line statement:<\/p>\n<p>tf.exe destroy $\/Project\/Main\/Source\/Data\/Project\/SQL<\/p>\n<p>After that, I corrected the Usermap.xml file and started the migration step again.<\/p>\n<p><strong>Migration step<\/strong><\/p>\n<p>For the migration step you need a migration setting file. A such file looks like the following:<\/p>\n<div id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:db7b65bc-37d7-48f6-81bb-dece6ae6cccc\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px; display: inline; float: none; padding: 0px;\">\n<pre class=\"brush: xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n&lt;SourceControlConverter&gt;\n&lt;ConverterSpecificSetting&gt;\n     &lt;Source name=\"VSS\"&gt;\n          &lt;VSSDatabase name=\"\\\\server\\vss\"\/&gt;\n          &lt;UserMap name=\"Usermap.xml\"\/&gt;\n     &lt;\/Source&gt;\n     &lt;ProjectMap&gt;\n          &lt;Project Source=\"$\/Project\/Scripts\/Func\" Destination=\"$\/Project\/Main\/Source\/Data\/Project\/SQL\/Func\"\/&gt;\n          &lt;Project Source=\"$\/Project\/Scripts\/Proc\" Destination=\"$\/Project\/Main\/Source\/Data\/Project\/SQL\/Proc\"\/&gt;\n          &lt;Project Source=\"$\/Project\/Scripts\/Trig\" Destination=\"$\/Project\/Main\/Source\/Data\/Project\/SQL\/Trig\"\/&gt;\n          &lt;Project Source=\"$\/Project\/Scripts\/View\" Destination=\"$\/Project\/Main\/Source\/Data\/Project\/SQL\/View\"\/&gt;\n     &lt;\/ProjectMap&gt;\n&lt;\/ConverterSpecificSetting&gt;\n&lt;Settings&gt;\n     &lt;TeamFoundationServer name=\"tfs\" port=\"8080\" protocol=\"http\" collection=\"tfs\/DefaultCollection\"\/&gt;\n     &lt;Output file=\"MigrationReport.xml\"\/&gt;\n&lt;\/Settings&gt;\n&lt;\/SourceControlConverter&gt;<\/pre>\n<\/div>\n<p>This setting file looks quite similar to the analyse setting file. But in the ProjectMap section you have the destination attribute where you define the directory in the TFS repository where you want to migrate the VSS data.<\/p>\n<p>In the Settings section there is an important entry TeamFoundationServer. For TFS 2010 you have to define the attribute collection. It wont work without this attribute.<\/p>\n<p>You start the migration with the following command line statement:<\/p>\n<p>vssconverter.exe migrate migratesettings.xml<\/p>\n<p>As a result of this statement you will receive a MigrationReport.xml file, which you can watch in a browser if there were any problems. I recommend also to have a look in the VSSConverter.log file. There are some valuable additional information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I had to migrate parts from a Microsoft Visual SourceSafe 2005 repository to a Microsoft Team Foundation Server 2010 repository. In this blog post I show what I had to do and what the pitfalls were. The tool To migrate a repository you have at least two possibilities: Migrate the latest snapshot or the whole history. Normally you prefer a migration of the whole history, so you don&#8217;t loose the gained advantage of an version control system. To migrate&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/blog.eweibel.net\/?p=1264\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13,5],"tags":[],"class_list":["post-1264","post","type-post","status-publish","format-standard","hentry","category-net","category-good-practices"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/plOV9-ko","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":303,"url":"https:\/\/blog.eweibel.net\/?p=303","url_meta":{"origin":1264,"position":0},"title":"From NUnit to MSTest","author":"Patrick","date":"30. Jun 2009","format":false,"excerpt":"Last week I migrated several projects from NUnit to MSTest. The developers use the Developer version of Microsoft Visual Studio Team System, so they have integrated unit-test support for MSTest. In this post I show you all the problems and work I had to migrate the tests from NUnit to\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/blog.eweibel.net\/?cat=13"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1306,"url":"https:\/\/blog.eweibel.net\/?p=1306","url_meta":{"origin":1264,"position":1},"title":"Build your private git infrastructure","author":"Patrick","date":"22. Apr 2014","format":false,"excerpt":"I've got for several years a virtual server to put my own projects under version control. I started with CVS, then migrated to SVN and now I'm start thinking to migrate all the old projects to git. This because I like git very much and I use it personally for\u2026","rel":"","context":"In &quot;First experiencies&quot;","block_context":{"text":"First experiencies","link":"https:\/\/blog.eweibel.net\/?cat=7"},"img":{"alt_text":"gitlogo","src":"https:\/\/i0.wp.com\/blog.eweibel.net\/wp-content\/uploads\/gitlogo.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":954,"url":"https:\/\/blog.eweibel.net\/?p=954","url_meta":{"origin":1264,"position":2},"title":"Visualize changes in your repository","author":"Patrick","date":"17. Feb 2011","format":false,"excerpt":"As you perhaps know, there exists a very interesting project on Google code, with which you can visualize the activities on your repository: Gource. Getting started It supports Git, Mercurial, Bazaar and SVN. There is also a way to visualize the changes in a repository of a Microsoft Team Foundation\u2026","rel":"","context":"In &quot;New technology&quot;","block_context":{"text":"New technology","link":"https:\/\/blog.eweibel.net\/?cat=6"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":116,"url":"https:\/\/blog.eweibel.net\/?p=116","url_meta":{"origin":1264,"position":3},"title":"Techdays 2009 in Bern","author":"Patrick","date":"15. Apr 2009","format":false,"excerpt":"I was last week at the Techdays 2009 in Bern. As expected there weren't a lot of new or interesting things. The most interesting topics were Azure (Cloud computing) and the next VisualStudio 2010. I visited following sessions: ADO.NET Data Services - Creating RESTful Services Overview Visual Studio 10 and\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/blog.eweibel.net\/?cat=13"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1154,"url":"https:\/\/blog.eweibel.net\/?p=1154","url_meta":{"origin":1264,"position":4},"title":"TF.exe or maybe the most useful tool for TFS","author":"Patrick","date":"31. Jan 2012","format":false,"excerpt":"When you've to use TFS, then there are moments when you're missing some features in the UI tools in Visual Studio. In those situations the console tool tf.exe is very useful. In this short blog post I summarized the commands I used the most. Update an old version of a\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/blog.eweibel.net\/?cat=13"},"img":{"alt_text":"visualstudio","src":"https:\/\/i0.wp.com\/blog.eweibel.net\/wp-content\/uploads\/visualstudio_thumb.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":622,"url":"https:\/\/blog.eweibel.net\/?p=622","url_meta":{"origin":1264,"position":5},"title":"Branching practices","author":"Patrick","date":"6. Apr 2010","format":false,"excerpt":"In an environment where several developers work at the same code base or several features have to be implemented, then branching will be a topic. I was asked to create a branching guide for my current employer which use TFS as source code repository. Motivation In our projects I found\u2026","rel":"","context":"In &quot;Good practices&quot;","block_context":{"text":"Good practices","link":"https:\/\/blog.eweibel.net\/?cat=5"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/blog.eweibel.net\/wp-content\/uploads\/image_thumb3.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.eweibel.net\/wp-content\/uploads\/image_thumb3.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.eweibel.net\/wp-content\/uploads\/image_thumb3.png?resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/posts\/1264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1264"}],"version-history":[{"count":3,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/posts\/1264\/revisions"}],"predecessor-version":[{"id":1834,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/posts\/1264\/revisions\/1834"}],"wp:attachment":[{"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}