Move projects between collections in TFS 2010

Sam picture Sam · Jul 12, 2010 · Viewed 14.5k times · Source

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:

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

Answer

beauXjames picture beauXjames · Aug 25, 2011

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.