Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move projects between collections in TFS 2010

I'd like to move some projects between collections but the only resources I've found are these two and they don't address how to do this in TFS 2010:

  • Feature Request
  • Move a Collection

Does anyone know of any other resource or has information on how to move a project from one collection to another?

like image 810
Sam Avatar asked Jul 12 '10 16:07

Sam


People also ask

Can you move a project from one team to another?

Once you're on the Teams page, hover over the name of the team you'd like to move. Click the '…' to trigger a dropdown menu, then select 'Move Projects Between Teams'. A popup will prompt you to select the project(s) you'd like to move.

How do I detach a collection in TFS?

If your databases are in use by a Team Foundation Server deployment, use TfsConfig collection /detach command line to handle this. When you detach a collection, all jobs and services are stopped, and then the collection database is stopped.

What is team project collection in TFS?

Each TFS Server can have one or more Team Project Collections. In turn, a Team Project Collection contains one or more Team Projects. A Team Project Collection is the basic unit of recovery for TFS. From a backup and restore perspective, a Team Project Collection is similar to a SharePoint Site Collection.


2 Answers

Throughout time, Man has wondered what would be the best, most efficient way to organize Projects within these all-encompassing Collections. There is so much stored within a collection as projects grow, that it seems almost impossible to keep all Projects in a single Collection.

Initially, we started with a DefaultCollection, then moved away from the singular idea and started creating a Collection per client...then we moved from this and started creating broad categories that housed various projects, however many of our clients had too much cross-over between the categories...and then we settled on a model...but by then had done so much development on particular projects that moving some into our final storage model was just going to have to wait. Well, we did the move today...brought projects from one Team Project in one collection into another Team Project in another Collection.

It was a success. We are still not fully using all Work Items and our general Source Control is fairly linear. We decided that losing the history of the Project was ok with us. We didn't totally delete things, so if we ever needed to go back, we could...but knew we'd never really need to do that at this point.

So, to stop making you wade through my monologue any longer, here's the steps we took:

  • Copy contents of project directory
  • Open Copied Solution
  • Follow prompts and PERMANENTLY remove Bindings to TFS
  • Turn off Source Control in VS options / SourceControl
  • Edit vbproj files in text for each project that still requires an IIS Binding to change UseIIS to False
  • Reload project and permanently remove TFS bindings
  • Repeat if necessary for each project that could not previously be loaded\
  • Save All Solution
  • Clean / Rebuild (removes references to TFS in solution file)
  • Turn on Source Control in VS options / SourceControl
  • Create the Team Project to store the Application in the appropriate Collection
  • Add project to Source Control See the mappings are all correct
  • Check it in

It seems like a lot of steps, but it's really obvious how it works...you're just making an external copy of the existing project, removing all instances of the source control bindings, then adding it back into source control where you want it. Ideally (like with Subversion), you could just export a project and you'd have the unbound version there for the picking...it's just that with TFS there's more bindings scattered throughout the code...and most of it is easily removed in the project and solution manifests.

Anyways, you'll probably have it done in a shorter time than it took for you to read this...hope it helps.

like image 153
beauXjames Avatar answered Sep 25 '22 12:09

beauXjames


You could look at the TFS Integration Platform (formerly called the TFS to TFS Migration Tool). That has utilities for moving source code from one instance of TFS to another, which should work if you want to move from one collection to another as well.

like image 40
Robaticus Avatar answered Sep 24 '22 12:09

Robaticus