Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The item is already under source control at selected location

How can I add a Visual Studio solution to the TFS? I created a 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:

Source Control error; already under source control at the selected location

I also deleted and recreated the same project in TFS and my solution does not have any .vssscc files, therefore I think it wasn't in TFS before, maybe some other copy... but when I deleted the project in TFS, it should not matter, right? I tried the bind/unbind option, but it seems that I'm missing 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 in.

like image 445
Muflix Avatar asked Feb 24 '17 12:02

Muflix


1 Answers

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

like image 143
Blacketik Avatar answered Oct 23 '22 12:10

Blacketik