How do I … move projects to a different collection in VS-TFS
27-Mar-1212 Leave a comment
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:
- Make sure project is loaded in current solution
- VS IDE File > Source Control > Change Source Control
- Select project to move > Unbind > OK ( this may be reversed by binding again )
- In Solution Explorer remove the project
- Save all
- In Windows Explorer copy the project to the location of the destination collection
- Close Visual Studio if ncessary saving the changes to the solution
- Open the destination collection
- 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
- Check-in optionally with a work item
- You could potentially keep the project in the original solution and use > File > Source Control > Add project from Source Control
- 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