简体   繁体   English

Visual Studio 2010在使用TFS时冻结

[英]Visual Studio 2010 Freezes when using TFS

When I try to perform most actions in TFS or a project using TFS, such as add a file to the project the main interface freezes. 当我尝试在TFS中执行大多数操作或使用TFS执行项目时,例如向项目添加文件时主界面会冻结。

I have looked at the call stack, and it appears to be in a deadlock while checking to see if a project is active. 我查看了调用堆栈,并且在检查项目是否处于活动状态时似乎处于死锁状态。

I have tried downloading a completely fresh copy of the code, but that did not help. 我已经尝试下载一个全新的代码副本,但这没有帮助。

I am using VS2010 with SP1 installed. 我正在使用安装了SP1的VS2010。

This is the top of the call stack for the Main Thread when frozen after refreshing my Pending Changes 在刷新我的Pending Changes后冻结时,这是主线程调用堆栈的顶部

ntdll.dll!_ZwWaitForSingleObject@12()  + 0x15 bytes
ntdll.dll!_ZwWaitForSingleObject@12()  + 0x15 bytes
Tfsprovider.dll!NVseeFC::CCriticalSection::Lock()  + 0x1d bytes
Tfsprovider.dll!CSccManager::fIsSolutionFolderProject()  + 0x3b bytes
Tfsprovider.dll!CSccManager::IsActive()  + 0x153 bytes
Tfsprovider.dll!CVsSccUI::Exec_icmdSccRefreshStatus()  + 0xbd bytes
Tfsprovider.dll!CVsCommandTargetMap<CVsSccUI,IOleCommandTarget>::Exec()  + 0x6a bytes
Tfsprovider.dll!CVsCommandTarget<NVseePkgsVssProvider::CGridBarDialog,IxNull>::Exec()  + 0x26 bytes
Tfsprovider.dll!CVsSccPackage::Exec()  + 0xa9 bytes
Tfsprovider.dll!CVsSccHatHelper::RefreshStatus()  + 0x3c bytes
[Managed to Native Transition]
Microsoft.VisualStudio.TeamFoundation.VersionControl.dll!Microsoft.VisualStudio.TeamFoundation.VersionControl.VssProvider.RefreshStatus() + 0x35 bytes
Microsoft.VisualStudio.TeamFoundation.VersionControl.dll!Microsoft.VisualStudio.TeamFoundation.VersionControl.ToolWindowPendingCheckinsForm.Microsoft.TeamFoundation.VersionControl.Controls.IPendingCheckinHost.RefreshPendingCheckins() + 0x69 bytes
Microsoft.TeamFoundation.VersionControl.Controls.dll!Microsoft.TeamFoundation.VersionControl.Controls.PendingCheckinsChannelControl.OnRefreshPendingCheckins() + 0x3d bytes
Microsoft.TeamFoundation.VersionControl.Controls.dll!Microsoft.TeamFoundation.VersionControl.Controls.PendingCheckinsChannelControl.RefreshSelectedChannel() + 0x22 bytes
Microsoft.VisualStudio.TeamFoundation.VersionControl.dll!Microsoft.VisualStudio.TeamFoundation.VersionControl.CommandHandlerPendingCheckins.Refresh_Exec(Microsoft.VisualStudio.TeamFoundation.CommandHandler handler, Microsoft.VisualStudio.TeamFoundation.CommandHandler.Command command, int commandId) + 0x13 bytes
(Other calls removed, they don't look relevant)

Has anyone else had this issue, or know of a fix for it? 有没有其他人有这个问题,或知道它的修复?

UPDATE: The interface comes back to life after waiting about 8 minutes. 更新:等待大约8分钟后界面恢复生机。 During this time the the TFS server sends me about 60,000 packets of data over the network. 在此期间,TFS服务器通过网络向我发送大约60,000个数据包。

UPDATE 2: I fixed this by manually recreating the SLN file. 更新2:我通过手动重新创建SLN文件来解决此问题。

This blocking behaviour was unfortunately a 'by design' problem. 不幸的是,这种阻塞行为是“设计”问题。 In Visual Studio 2010, Team Explorer (and a bunch of other VS components) would perform many operations synchronously and block the UI thread in the Visual Studio shell while they were processing, especially on source control operations. 在Visual Studio 2010中,团队资源管理器(以及许多其他VS组件)将同步执行许多操作,并在处理时阻止Visual Studio shell中的UI线程,尤其是在源代码控制操作上。

Making source control operations asynchronous was one of the design goals in Visual Studio 2012 - http://blogs.msdn.com/b/bharry/archive/2011/09/01/wrapping-up-tfs-11-version-control-improvements.aspx 使源控制操作异步是Visual Studio 2012中的设计目标之一 - http://blogs.msdn.com/b/bharry/archive/2011/09/01/wrapping-up-tfs-11-version-control- improvements.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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