自从使用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的“Waiting for a required operation to complete...”问题的更多相关文章

  1. 安装python 第三方库遇到的安装问题 microsoft visual studio c++ 10.0 is required,Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?

    问题一: microsoft visual studio c++ 10.0 is required 安装scrapy时候出现需要vc c++ 10,有时安装其他也会有. 解决方法:安装vc 2010, ...

  2. 奇怪的Visual Studio 2013停止响应问题

    昨天开始遭遇这个问题,今天再次遭遇. 疑似问题发生在写代码的窗口中复制/粘贴时(有待进一步确认触发条件),突然停止响应,出现下面的对话框: 对话框中的文字为: Waiting for a requir ...

  3. [转]Cordova + Ionic in Visual Studio - 101 Tutorial [Part I]

    本文转自:http://binarylies.ghost.io/cordova-ionic-in-visual-studio/ Hi everyone, I thought about lending ...

  4. Try out the latest C++ compiler toolset without waiting for the next update of Visual Studio

    Updated 22/Apr/2016: The NuGet package is now being uploaded daily. The payload doesn’t change every ...

  5. Working with Data » 使用Visual Studio开发ASP.NET Core MVC and Entity Framework Core初学者教程

    原文地址:https://docs.asp.net/en/latest/data/ef-mvc/intro.html The Contoso University sample web applica ...

  6. .NET Memory Allocation Profiling with Visual Studio 2012

    .NET Memory Allocation Profiling with Visual Studio 2012 This post was written by Stephen Toub, a fr ...

  7. 如何解决Visual Studio调试Debug很卡很慢

    http://brightguo.com/make-debugging-faster-with-visual-studio/ Have you ever been frustrated by slow ...

  8. C# on Visual Studio Code

    installation Download .NET Core SDK installer and install it. https://www.microsoft.com/net/download ...

  9. [转]Getting Start With Node.JS Tools For Visual Studio

    本文转自:http://www.c-sharpcorner.com/UploadFile/g_arora/getting-started-with-node-js-tools-for-visual-s ...

随机推荐

  1. linux -- Ubuntu 命令技巧合集

    http://www.nenew.net/UbuntuSkills.html#.E6.9F.A5.E7.9C.8B.E8.BD.AF.E4.BB.B6xxx.E5.AE.89.E8.A3.85.E5. ...

  2. Stream(流)的基本操作

    //把流转化为文件  public static void StreamToFile(Stream stream, string filepath)        {            byte[ ...

  3. 【Java面试题】59 Math.round(11.5)等於多少? Math.round(-11.5)等於多少?

    Math类中提供了三个与取整有关的方法:ceil.floor.round,这些方法的作用与它们的英文名称的含义相对应,例如,ceil的英文意义是天花板,该方法就表示向上取整,Math.ceil(11. ...

  4. POI-根据Cell获取对应的String类型值

    /** * 根据不同情况获取Java类型值 * <ul><li>空白类型<ul><li>返回空字符串</li></ul>< ...

  5. c++ list set 方法集合

    1. set的基本操作: begin() 返回指向第一个元素的迭代器 clear() 清除所有元素 count() 返回某个值元素的个数 empty() 如果集合为空,返回true end() 返回指 ...

  6. HBase原理、基本概念、基本架构-3

    HBase是Apache Hadoop的数据库,能够对大型数据提供随机.实时的读写访问.HBase的目标是存储并处理大型的数据.HBase是一个开源的,分布式的,多版本的,面向列的存储模型.它存储的是 ...

  7. chrome浏览器开发者工具使用教程[转]

    转自:http://www.cr173.com/html/16930_1.html 更多资源:https://developers.google.com/chrome-developer-tools/ ...

  8. mysql数据库,如何在登录mysql之后执行操作系统上的SQL脚本?

    需求描述: 通过mysql客户端登录到mysql数据库,如何执行操作系统上的SQL脚本文件呢? 操作过程: 1.编写测试脚本文件 [mysql@redhat6 scripts]$ cat SeCoun ...

  9. swift学习笔记之—自定义函数的规则说明

    原文出自:www.hangge.com  转载请保留原文链接:http://www.hangge.com/blog/cache/detail_517.html 1,无返回值的函数 func test( ...

  10. [笔试题]黑板上写下50个数字,选两个黑板上数字a和b,在黑板写|b-a|,剩下的数字?

    在黑板上写下50个数字:1至50.在接下来的49轮操作中,每次做如下操作:选取两个黑板上的数字a和b,擦去,在黑板上写|b-a|.请问最后一次动作之后剩下的数字可能是什么?为什么?(不用写代码,不写原 ...