Visual Studio的“Waiting for a required operation to complete...”问题
2014-02-05 15:11
483 查看
自从使用Visual Studio 2013之后,多次遇到这个恼人的“Waiting for a required operation to complete...”问题。
问题发生于在Visual Studio 2013中复制/粘贴的时候。问题发生后,Visual Studio 2013停止响应,状态栏一直显示“Waiting for a required operation to complete...”,只能通过任务管理器强制结束Visual Studio进程,带来的后果是——所有未保存的代码全部丢失。
本来以为是Visual Studio 2013带来的新问题,后来在MSDN中发现原来这是一个历史悠久的问题,至少在Visual Studio 2008时代就出现了,详见:http://msdn.microsoft.com/en-us/library/8037k9sb(v=vs.90).aspx,而更值得关注的是这篇MSDN内容下面的评论:
Why on earth is the message so vague??
This is another instance of a longstanding problem with progress and error messages that Microsoft seems totally blind to. They say things like "the system cannot find the file specified", or "Visual Studio is waiting for a required operation to complete": with a tiny bit more effort , the messages could refer specifically to what is happening (e.g. "the system cannot find the file specified with name abcdef.dll" and this would make the problem so much easier to solve! However, despite having pointed out this problem several years ago in feedback, the problems are still there, even in code written recently...
这里说“历史悠久的问题”,不是指引发“Waiting for a required operation to complete...”的原因,而是这个提示信息本身——提示信息太笼统,对定位问题一点帮助没有。上面的评论抱怨就是这个。
MSDN中提到的Visual Studio 2008中的这个问题是防病毒软件引起的,但我在Visual Studio 2013中遇到的问题不是这个原因,因为电脑上根本没有安装防病毒软件。
在stackoverflow上了解这个问题更多是某些VS插件(Add-in)引起的:
It is a very generic diagnostic. It is triggered by COM, heavily used in Visual Studio to implement extensibility. The underlying trigger is the IMessageFilter interface. The trigger occurs when COM marshals a method call to another thread and that call doesn't complete for 60 seconds.
There's little value in the actual notification, it is telling you something you already know. By the time 60 seconds have passed, you typically already have noticed things are not working well. Short from the wee bit of useful knowledge that Visual Studio isn't actually completely dead. The call however has to complete before VS gets usable again. There's little you can do but tap your foot and wait.
This problem is almost always caused by an add-in. Resharper is certainly a good candidate. You find the trouble-maker by disabling the add-ins one-by-one until the problem disappears. It is the kind of problem that's common with new versions of Visual Studio, it takes the add-in vendors a while to get the bugs and hangups ironed out. Contact the vendor for support and in general look for updates that may solve the issue.
而我的电脑上的VS2013只安装了两个插件——Git Extensions与TestDriven.Net。
如果真是VS插件引起的,目前只能怀疑Git Extensions,这有待进一步验证。
【相关链接】
奇怪的Visual Studio 2013停止响应问题
问题发生于在Visual Studio 2013中复制/粘贴的时候。问题发生后,Visual Studio 2013停止响应,状态栏一直显示“Waiting for a required operation to complete...”,只能通过任务管理器强制结束Visual Studio进程,带来的后果是——所有未保存的代码全部丢失。
本来以为是Visual Studio 2013带来的新问题,后来在MSDN中发现原来这是一个历史悠久的问题,至少在Visual Studio 2008时代就出现了,详见:http://msdn.microsoft.com/en-us/library/8037k9sb(v=vs.90).aspx,而更值得关注的是这篇MSDN内容下面的评论:
Why on earth is the message so vague??
This is another instance of a longstanding problem with progress and error messages that Microsoft seems totally blind to. They say things like "the system cannot find the file specified", or "Visual Studio is waiting for a required operation to complete": with a tiny bit more effort , the messages could refer specifically to what is happening (e.g. "the system cannot find the file specified with name abcdef.dll" and this would make the problem so much easier to solve! However, despite having pointed out this problem several years ago in feedback, the problems are still there, even in code written recently...
这里说“历史悠久的问题”,不是指引发“Waiting for a required operation to complete...”的原因,而是这个提示信息本身——提示信息太笼统,对定位问题一点帮助没有。上面的评论抱怨就是这个。
MSDN中提到的Visual Studio 2008中的这个问题是防病毒软件引起的,但我在Visual Studio 2013中遇到的问题不是这个原因,因为电脑上根本没有安装防病毒软件。
在stackoverflow上了解这个问题更多是某些VS插件(Add-in)引起的:
It is a very generic diagnostic. It is triggered by COM, heavily used in Visual Studio to implement extensibility. The underlying trigger is the IMessageFilter interface. The trigger occurs when COM marshals a method call to another thread and that call doesn't complete for 60 seconds.
There's little value in the actual notification, it is telling you something you already know. By the time 60 seconds have passed, you typically already have noticed things are not working well. Short from the wee bit of useful knowledge that Visual Studio isn't actually completely dead. The call however has to complete before VS gets usable again. There's little you can do but tap your foot and wait.
This problem is almost always caused by an add-in. Resharper is certainly a good candidate. You find the trouble-maker by disabling the add-ins one-by-one until the problem disappears. It is the kind of problem that's common with new versions of Visual Studio, it takes the add-in vendors a while to get the bugs and hangups ironed out. Contact the vendor for support and in general look for updates that may solve the issue.
而我的电脑上的VS2013只安装了两个插件——Git Extensions与TestDriven.Net。
如果真是VS插件引起的,目前只能怀疑Git Extensions,这有待进一步验证。
【相关链接】
奇怪的Visual Studio 2013停止响应问题
相关文章推荐
- Maven项目导入到Eclipse时Build出现the user operation is waiting for building workspace to complete的问题解决
- Visual studio is waiting for internal operation to complete
- The user operation is waiting for "Building workspace" to complete
- Microsoft Visual Studio is waiting for an internal operation to complete 解决方法
- Eclipse总是提示The user operation is waiting for background work to complete的解决方法(ubuntu环境下)
- The user operation is waiting for "building workspace" to complete”
- the user operation is waiting for building workspace to complete解决办法
- Eclipse:The user operation is waiting for background work to complete的一种可能出错及解决办法
- eclipse运行程序显示the user operation is waiting for "building workspace" to complete
- The user operation is waiting for background work to complete
- Eclipse the user operation is waiting for "buiding workspace" to complete
- 关于eclipse环境下的The User Operation is waiting for background work to complete
- the user operation is waiting for "building workspace to" complete (eclipse)
- eclipse the user operation is waiting for building workspace" to complete
- The user operation is waiting for "Building workspace" to complete
- eclipse运行程序显示the user operation is waiting for "building workspace" to complete
- 解决 The user operation is waiting for "Building workplace" to complete
- android开发小记2-----the user operation is waiting for building workspace to complete
- 【转载】Eclipse the user operation is waiting for "buiding workspace" to complete
- 解决 the user operation is waiting for building woekspace to complete