Tuesday, February 15, 2011

Upgrade VS2008 to work with TFS 2010

Steps for VS2008 are quite similar to that for VS2005. You should install the below mentioned components in order. The Installation order is important.
- Install Visual Studio 2008
- Install
Team Explorer 2008
- Install Visual Studio 2008 SP1 (This will upgrade both VS2008 and Team Explorer 2008 to SP1)
- Install
VSTS 2008 Forward Compatibility Update
After the installation is completed successfully, you should provide the entire URL to connect TFS2010 server.
For more details see previous post:

Monday, February 14, 2011

Upgrade VS2005 to work with TFS 2010

Problem Statement: We made a decision move to TFS2010. Problem is we have a set of projects running in .Net Framework 2.0 (VS2005), 3.5 (VS2008) and some in 4.0 (VS2010).
And this it;
VS2010 is fine with TFS 2010. I have to check the feasibility to run TFS 2010 server with old clients VS 2005 and VS2008. Here is the sequence documented in different forums for VS2005:
Connect to TFS2010 Server using VS 2005 Client
1.    Fresh Machine
Be aware that the order of the installation is important for the solution to work correctly.
1.    Install Visual Studio 2005
2.    Install Team Explorer 2005
3.    Install latest Service Pack for Visual Studio 2005
4.    Install the Forward Compatibility Update for TFS 2010
When you install Team Explorer after you install the service pack, Team Explorer will not be patched by the Forward Compatibility Update!
2.    Machine with VS2005 and SP1 installed
Be aware that the order of the installation is important for the solution to work correctly.
1.    Install Team Explorer 2005
2.    Re-Install SP1 for Visual Studio 2005 to upgrade team explorer to SP1.
3.    Install the Forward Compatibility Update

ü  How to know whether VS2005 SP1 is already installed o?
I have some developers running VS2005 from Vista/Windows 7. So I should install ‘VS 2005 SP1 update to Vista/Win7 (not for XP)’ before last step ‘Install the Forward Compatibility Update.
3.    Important URLs for VS2005 upgradation
Here are some of the details:
ü  Visual Studio Team System 2005 Team Explorer
ü  Visual Studio 2005 Service Pack 1 Update for Windows Vista/Windows7  (not needed for XP)
ü  Visual Studio Team System 2005 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010 (Installer)
4.    How to connect with TFS2010 from VS2005 when everything is installed

As TFS2010 uses concept to Team Project Collections. And path in my case is like http://tfs-server:8080/tfs .  Problem is how to put this connection string in the dialog when there is no ‘Path’ textbox available. If I specify just IP and port, I get error ‘Unable to connect to this Team Foundation Server’. You should provide the entire URL to connect TFS2010 server.

Thursday, February 3, 2011

Full Migration from VSS 2005 to TFS 2010 with History

I wanted to perform 'Full Migration' along with all code/label history to transfer from Visual Source Safe 2005 (or V8) to TFS 2010.

I figured out, VSSConvertor 2010 is more stable than previous versions. All issues reported in previous version are fixed in VSSConvertor10 with framework4.0. VSSConvertor10 does not support old tfs migrations (tfs2008 and tfs2005). We can use VS2010 commandline to use VSSConverter tool. 
Here are the steps:
1. Make sure TFS 2010 is installed on accessible location
2. Make sure, TFS explorer is available on VSS machine
3. VSS is version 2005 or V.8
4. You have Admin password of VSS Application
5. Make sure all files are checked-in by all developers
6. Create a copy of VSS database file (Must do for safety purpose in case things go wrong).
7. Install KB947647 to fix known issue during migration. http://code.msdn.microsoft.com/KB947647/Release/ProjectReleases.aspx?ReleaseId=1028
8. Create the Analysis settings files like analysissettings.xml in a location you want. I have this path on my machine E:\BashVSS2TFSMigration\analysissettings.xml

<?xml version="1.0" encoding="utf-8"?>
<SourceControlConverter>
<ConverterSpecificSetting>
<Source name="VSS">
<VSSDatabase name="E:\BashWorkspace\VSSRepository"></VSSDatabase>
<UserMap name="E:\BashVSS2TFSMigration\Usermap.xml"></UserMap>
<SQL Server="TEO-SRV-CCNET2K\SQLEXPRESS"></SQL>
</Source>
<ProjectMap>
<Project Source="$/PilotProject4Teo"></Project>
</ProjectMap>
</ConverterSpecificSetting>
<Settings>
<Output file="E:\BashVSS2TFSMigration\Analysis.xml"></Output>
</Settings>
</SourceControlConverter>
Here is xml description:

VSSDatabase = VSS Repository/databse file path
UserMap = User mapping frile name to be generated after analysis command.
SQL Server – instance name – can use SQL express for files < 4GB. Otherwise use Full SQL Server Instance where user should have access rights
Project = project name on vss to be ported
Output = analysis file to be generated after analysis command.
9. Analysis Command.

cmd> vssconverter analyze "E:\BashVSS2TFSMigration\analysissettings.xml"

10. Two files are generated with names Analysis.xml and Usermap.xml.
 11. I double clicked Analysis.xml and figure out that one Error Occured. Error was nothing but asking me to install a hot fix in VSS 'KB950185' from path: 
 12. Installed hotfix: KB950185
http://code.msdn.microsoft.com/KB950185/Release/ProjectReleases.aspx?ReleaseId=1123
 13. Again run the analysis command, this time things went correct. Here is analysis report with 0 Error and 1 Warning.
14. I edited Usermap.xml to assign destination users (which are Active Directory Users offcourse mapped to VSS users). History will be transferred to mapped users in tfs.

15. I edited Usermap.xml to assign destination users (which are Active Directory Users offcourse mapped to VSS users). History will be transferred to mapped users in TFS 2010.
<?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">
  <!--
This file is automatically created by VSS Converter. You can optionally use the file to map
a VSS user to a Team Foundation user. For example, <UserMap From="Jane" To="MyDomain\Janep"></UserMap>
This mapping causes all actions logged by VSS user “Jane” to be changed to Team
Foundation user “ MyDomain\Janep ” during migration.
-->
  <UserMap From="basharat.hussain" To="[MyDomain]\basharat.hussain" />
  <UserMap From="Cruisecontrol" To="[MyDomain]\shahid.iqbal" />
  <UserMap From="ADMIN" To="[MyDomain]\tfssetup001" />
</UserMappings>

At least users should have readonly rights on TFS team project.
16. Created a Team Project in TFS with name ‘GD Project’ and provided full rights to domain user ‘basharat.hussain’ and Shahid.Iqbal readonly rights.
17. Created a MigrattionSettings.XML file by copying from AnalysisSettings.XML.

<?xml version="1.0" encoding="utf-8"?>
<SourceControlConverter>
<ConverterSpecificSetting>
<Source name="VSS">
<VSSDatabase name="E:\BashWorkspace\VSSRepository"></VSSDatabase>
<UserMap name="E:\BashVSS2TFSMigration\Usermap.xml"></UserMap>
</Source>
<ProjectMap>
<Project Source="$/PilotProject4Teo" Destination="$/GD Project/PilotProject4Teo"/>
</ProjectMap>
</ConverterSpecificSetting>
<Settings>
<TeamFoundationServer name="192.168.3.249" port="8080" protocol="http"
collection="tfs/DefaultCollection"></TeamFoundationServer>
<Output file="E:\BashVSS2TFSMigration\Migration.xml"></Output>
</Settings>
</SourceControlConverter>
Here is xml description:
Project Source = Project path in VSS
Project Destination = Propased Project path under ‘GD Project’ team project
TeamFoundationServer = TFS2010 DNS or IP address, with port
Collection – Project collection Name, I accessed following url and I can see collection name in web page ‘http://192.168.3.249:8080/tfs/web’
Output = migration file to be generated after analysis command.
18. Migrate Command:
cmd> vssconverter migrate "E:\BashVSS2TFSMigration\MigrationSettings.xml"
19. Inspect TFS 2010 and you can see migrated projects with history
20. Done