vss2005迁移到TFS

昨天把vss2005迁移到TFS,过程还比较顺利~
先说一下我的环境:
win2003中文版本+sql server2005中文版+TFS Workgroup.Edition
TFS 数据层、应用程序层 全部安装在一台机器上。

根据msdn上面的介绍,建了两个 xml 配置文件

usermap.xml:

<?xml version="1.0" encoding="utf-8"?>
<UserMappings>
<UserMap From="administrator" To="administrator"></UserMap>
<UserMap From="X" To="x"></UserMap>
<UserMap From="Guest" To="Guest"></UserMap>
.......
</UserMappings>
.......用vss2005里实际的用户名代替。


settings.xml:

<?xml version="1.0" encoding="utf-8"?>
<SourceControlConverter>
<ConverterSpecificSetting>
     <Source name="VSS">
          <VSSDatabase name="c:\SourceSafe"></VSSDatabase>
          <UserMap name="c:\Usermap.xml"></UserMap>
          <SQL Server="LocalHost" />
     </Source>
     <ProjectMap>
          <Project Source="$/MKTMAXH" Destination="$/mktma"></Project>
     </ProjectMap>
</ConverterSpecificSetting>
<Settings>
     <TeamFoundationServer name="mxserver" port="8080" protocol="http"></TeamFoundationServer>
     <Output file="C:\Migration.xml"></Output>
</Settings>
</SourceControlConverter>

msdn上没有 这一句:
          <SQL Server="LocalHost" />
转换过程中报错,说联不上数据库,找了半天才找到需要加这么一句。

还有一个问题。安装TFS的时候,安装了体验版vs2005,
但是vs2005菜单中没有这一项:“Visual Studio 2005 命令提示”
于是我从安装完整vs2005版本的机器上提取了下面的vsvars32.bat文件:

@SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
@SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8\VC
@SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
@SET FrameworkVersion=v2.0.50727
@SET FrameworkSDKDir=C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0
@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR
@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR

@echo Setting environment for using Microsoft Visual Studio 2005 x86 tools.

@rem
@rem Root of Visual Studio IDE installed files.
@rem
@set DevEnvDir=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE

@set PATH=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\bin;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages;%PATH%
@set INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include;%INCLUDE%
@set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;%LIB%
@set LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\LIB

@goto end

:error_no_VSINSTALLDIR
@echo ERROR: VSINSTALLDIR variable is not set.
@goto end

:error_no_VCINSTALLDIR
@echo ERROR: VCINSTALLDIR variable is not set.
@goto end

:end

用C:\windows\system32\cmd.exe 打开上面的bat文件,参数如下:
%comspec% /k ""C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat""
例如settings.xml在c:\   在命令行方式下进入c:\
这样就可以直接在命令行方式下运行迁移工具了:
VSSConverter Migrate settings.xml

这里有中文的迁移介绍:
http://msdn2.microsoft.com/zh-cn/library/ms253109(VS.80).aspx

你可能感兴趣的:(vss2005迁移到TFS)