How do I … move projects to a different collection in VS-TFS

After a few years I got to a point of over 40 projects in one solution. Solution explorer required a vertical scroll bar even before expanding any projects.
Some projects are clearly not relevant to the solution or are abstract. I was keeping them in the solution because I wanted to promote abstraction, so wanted to regularly change these projects. Because they are abstract there is an argument to separate them out and potentially use them elsewhere.

I have taken the plunge. And this article is to record how I have done it.

There are other views and procedures on web.
Also in Microsoft Connect there is a request for this feature to be added.

I found the following to work and seemed easier than the other procedures:

  1. Make sure project is loaded in current solution
  2. VS IDE File > Source Control > Change Source Control
  3. Select project to move > Unbind > OK ( this may be reversed by binding again )
  4. In Solution Explorer remove the project
  5. Save all
  6. In Windows Explorer copy the project to the location of the destination collection
  7. Close Visual Studio if ncessary saving the changes to the solution
  8. Open the destination collection
  9. Add the project.
    • If you miss out step 3 then it will not show as to add to source control
    • If you include step 2 then it will show to add to source control
  10. Check-in optionally with a work item
  11. You could potentially keep the project in the original solution and use > File > Source Control > Add project from Source Control
  12. Or more common delete by:
    • > Source Control Explorer > Selecting the folder > Right-click Delete > Check-in
    • This will not delete it from the local folder > so this may be deleted manaully > you may need to close the current solution
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: