Question

I would like to know if there's a way to move a project in one Team Foundation Server source control to a different source control on a separate Team Foundation Server? I don't want to have to copy the files to a different folder and map that folder to the new TFS server. I've tried removing the bindings and unmapping the local source control folder on my compute, but when I do this it removes the solution file and all source code files from my local folder. Is there a way I can maintain the source code files locally and just simply map and bind that folder to the new TFS server? Your insight is appreciated, thank you.

Was it helpful?

Solution

You can remove the workspace from the old folder, so the folder is not mapped anymore to the old server. Then connect to the new TFS server and add the files to source control by either drag 'n drop or by starting the add folder command on the Source Control Explorer.

OTHER TIPS

A few minutes ago a successfully change a project source control, to be sure when writing this answer.Let me explain how i do that;

Firstly i opened project that is still binded to old source control. Then i unbound all of the bindings at to old server. Then i saved my solution and close it. (I am not sure is this neccessary but i deleted my .vssc files) After this i'd opened the solution again and deleted my workspace from old tfs (i checked no physical file delete occurs) Then i changed my source control and Added My Project to new TFS.

You can try this but please get backup for safety :)

Based on the answer from Ewald Hofman, here are steps to follow:

  1. Remove the solution from your workspace
  2. Unbind the projects from TFS
  3. Connect to the project from the new TFS server
  4. Add the solution to it
  5. Check In the added files

Remove the solution from your workspace: from Visual Studio select File, Source Control, Advanced, Workspaces. Here you will see the workspaces created on the local computer. Select the one that contains your solution and click Edit. Select the working folder you want and click Remove.

Unbind the projects from TFS: select File, Source Control, Advanced, Change Source Control. Here you will find all the projects, the solution file and their binding. Select each one and click Unbind.

Connect to the project from the new TFS server: in Team Explorer(if not visible, select View, Team Explorer) click on the Connect icon from the header, Select Team Projects and select yours.

Add the solution to it: select File/Source Control/Add Solution to Source Control. It will appear a new window with the project you connect to already selected. Just click Ok.

Check In the added files: select File/Source Control/Check In.

I wrote a post on the subject. You can find it here.

I just did the same thing and it was a bit of a pain. First in the VS 2013 choose File -- Source Control -- Change Source Control. From here I was able to remove the old TFS server and add the new one. Of course this means that all of your old history is now lost. I am pretty sure there is an easier way to migrate from one server to another if you still have access to both, but this would probably need to be done from the server and not VS.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top