问题
I am desperate, I spend all day with this issue, please how can I add Visual Studio solution to the TFS ? I created total new project named for example PROJECTX and I have solution with the name PROJECTX.sln. I select File > Source Control > Add Solution To Source Control
but immediately I get this error
I also deleted and recreate the same project in TFS and my solution has not any .vssscc
files, therefore I think it wasn't in the TFS before, maybe some other copy but when I deleted the project at the TFS it should not matter ? I tried bind/unbind option, but it seems that i dont understand something important. Also I don't have any pending changes and the TFS project is empty on the TFS server.
If I select the Ignore All option, I cant check in the files, because it tells me it is already checked but it is not !?
回答1:
On my case, I had to correct the binding using the Change Source Control dialog box :
- Select solution or project that you want to add to source control
- Go to "File" -> "Source Control" -> "Advanced" -> "Change source control" (if you look at Microsoft website, you will see that there is not "Advanced" menu in their example, it may be related to VS version or menu settings).
- Click "Bind" on each row.
- If a row in underlined in red, it may indicate that the current project is not checked in into TFS, check-in all project before you proceed to the binding.
Microsoft - How to : Bind and Unbind Projects and Solutions
回答2:
I solved this issue by copying the project folder to the new windows folder outside of local tfs workspace.
回答3:
I had the same. I first created a new folder in TFS, then in File Manager, copy the whole project w/o .sln file to this folder (TFS already created in file system), back in TFS, clicked on "+" icon to add everything underneath this new folder.
Then checked in for the first time.
Continued working on the project made some changes. I thought it's okay to "Add Solution to TFS", still the same problem, even though removing all .vss files/folders. Since I know TFS already has a copy, so I "Compare" it with my local version see the difference there.
So I just clicked on "Ignore All" button, Bingo, works.
回答4:
I followed these steps:
- If you're already in Visual Studio with the solution opened, close the solution via:
File > Close solution
. - In
Source Control Explorer
window, in "Folder" section (left side of the screen), navigate between your TFS projects, find and open the solution you want. - You'll get a message saying:
The solution you are opening is bound to the source control on the
following Team Foundation Server: your_server_folder.
Would you like to contact this server to try to enable source control integration?
Press Yes
and if the connection is correct, you'll see now your solution is bind to source control.
来源:https://stackoverflow.com/questions/42438683/the-item-is-already-under-source-control-at-selected-location