简体   繁体   中英

Visual Studio 2010 source control disappearing from Solution Explorer

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?

删除.vssscc文件并让Visuasl Studio在重新加载项目解决方案时重新创建它。

Try file » source control » change source control . Unbind and rebind .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM