Visual Studio 2012 - How do I bind my solution to

2019-04-04 00:26发布

问题:

I have a Visual Studio 2012 (RC) solution bound to a CodePlex server. However, I want to bind it to a Team Foundation Service server instead. I don't care about preserving the history, since I've just started the project anyway. How should I go about binding the solution to the new server?

I've tried File->Source Control->Advanced->Change Source Control, while connected to the Team Foundation Service TFS server, but I can only see that the action Bind is available to me, and this just re-binds to CodePlex. Which is strange, since Visual Studio pointed me to the Change Source Control dialog when I tried to add the unbound solution to the Team Foundation Service server directly.

回答1:

I found out how to do this with the help of this article. What I did was to, while connected to CodePlex TFS, open File->Source Control->Advanced->Workspaces and then double-click on my workspace item. This launched a dialog where I removed the solution's working folder.

After this I could connect to Team Foundation Service and freely let the solution be source controlled by that server.



回答2:

In case you moved your project under another SC and you need to bind it to this SC:

  1. Unbind it in the File->Source Control->Advanced->Change Source Control.
  2. In Solution Explorer right click the project and then Source Control->Add Selected Projects to Source Control.