Symptoms
When I open a certain WPF solution in Visual Studio 2010, after the solution loads and is displayed in Solution Explorer, for a moment, I see the source control icons (locks, checkout checks, etc) next to the items in the solution and then they disappear, except for check marks for checked out files. Right clicking any of the items without an icon shows a context menu without any of the source control actions. The checked items can be checked in and then the source control actions disappear for them too. If I open the Change Source Control dialog, the solution and all of the projects have the red line under them indicating they are invalid.
I can unbind each of them, then rebind them to the exact same Server Name and Server Binding successfully. This causes solution explorer to temporarily become source control-enabled again. But if I click the refresh button on solution explorer, I get a dialog stating:
An error occurred while accessing the source control system. Do you want to disable source control for this session.
This causes the solution explorer to lose source control interoperability again.
Yesterday, I tried to download the latest of a different solution that I had update on another machine. I found that somehow the new files I had added to the solution on the other machine were not in TFS. So I excluded them from the project and re-included them to add them to TFS. Then on my machine did Get Latest again. The solution updated so it knew the files should be included but it didn't download the files themselves. I tired Get Latest with Replace files even if the local version matches the server version and they still didn't download. I had to specifically get each file from Source Control Explorer. This may be unrelated but I wanted to include it in case it's not.
What I've Tried
To try to solve the first problem, I reset all VS settings and restarted. This didn't work so I shut it down. I uninstalled TFS Power Tools and that didn't work either. I replaced my .sln and .vssscc with the latest from TFS. I unselected TFS as the source control plug-in and reselected it. Uninstalled the NuGet Package Manager extensions, which also did not help. I don't have any add-ins and the only extensions I have installed now are a few Telerik control extensions, which are not new.
Why are the source control bindings becoming invalid?
Delete the .vssscc
file and let Visuasl Studio
recreate it when it reloads the project solution.