Reputation: 6768
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:
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.
Upvotes: 11
Views: 12057
Reputation: 194
This is how you need to bind the solution to the server
Upvotes: 0
Reputation: 310
Close the solution . open the solution file in notepad Then remove the below section.
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 2
SccEnterpriseProvider = {3CF58AB4-18FA-4F8D-95D4-32DDF27D189R}
SccTeamFoundationServer = https://serverIP/Project
SccLocalPath0 = .
SccProjectUniqueName1 = Ecample\\Example.csproj
SccProjectName1 = Example
SccLocalPath1 = Example
EndGlobalSection
then open the solution once again it should prompt to bind, do the binding properly.
Upvotes: 1
Reputation: 2575
I followed these steps:
File > Close solution
.Source Control Explorer
window, in "Folder" section (left side of the screen), navigate between your TFS projects, find and open the solution you want.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.
Upvotes: -1
Reputation: 7037
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.
Upvotes: 0
Reputation: 411
On my case, I had to correct the binding using the Change Source Control dialog box :
Microsoft - How to : Bind and Unbind Projects and Solutions
Upvotes: 27
Reputation: 6768
I solved this issue by copying the project folder to the new windows folder outside of local tfs workspace.
Upvotes: 0