views:

222

answers:

1

I have a solution which I developed in VS2008 and which I am trying to add to Source Control (TFS 2010, though the issue happened in TFS 2008 as well). I have several TFS workspaces on my computer and I have access to several Team Projects.

When I right click the solution in my Solution Explorer and choose the "Add Solution to Source Control" option I am never given an option of choosing which Workspace or which Team Project to add the existing solution too. VS2008 then proceeds to add it to the same team project every time. I have tried selecting an alternate workspace/team project in every window where I can see an option for it but it always adds it back to the same one. I even tried changing the name of my new workspace so that alphabetically it was the first thinking that it might be somehow related to that... no luck.

I then tried goign to the Change Source Control window where you can add/remove bindings on a solution/project but that window also defaults to the same Team Project as trying to add the solution directly does...

Any help would be greatly appreciated with this, maybe I'm just missing something?

+1  A: 

In my experience, the add to source control mechanism tries to use the physical path of the solution to determine which TFS project it belongs to. You could try to move the solution by right-clicking on the solution folder in the Source Control Explorer and choosing "move" to move it to the TFS project of your choice.

Daniel Auger
Ahh, this makese sense. I had the folder for the solution on my desktop and I had previously set my desktop as the mapped folder for another project, obviously not coincidentally the one that it keeps adding itself too.I was actually about to post my own answer, which was what you suggested. I ended up adding the solution, adding the other team project to the same workspace, moving the folder to the new Team project, and then disconnecting the team project from the workspace.
Patricker