4
votes

I've accidentally added my solution to wrong Team project on TFS, I've gone to File/Source Control/Advanced/Change source control, I've selected all my projects and unbinded them, went to solution, and after right click I've chosen Add Solution To Source Control, but pop-up appeared saying:

    The item 'ProjectName.sln' is already under source control at the selected location. 
    If you are trying to rebind a project that you have already added to source control 
outside Microsoft Visual Studio, you should use the Change Source Control command. If you are 
adding this project for the first time, you should either choose a different server folder for the project or move the 
existing project to a different server folder.

I've tried to bind project to new Team project, but when I tried to check in, not whole project was checked but only changes added since I've accidentally added it to wrong Team project.

To sum up how can now I add my project to TFS source control ?

1

1 Answers

5
votes

You need to unbind it, then manually move the files into a local folder that is mapped to the correct team project. Then try doing the Add Solution to Source Control.

Each team project will be mapped to a different folder in your local workspace. If your files are under the folder for project A (which I assume they are if you've already added it to that team project), then you need to move them to a folder under Project B before trying to bind to Project B.