在编辑器中键入时Visual Studio崩溃

时间:2011-01-25 08:57:37

标签: visual-studio-2010 editor crash intellisense

我已经使用VS2010几个星期但是在过去的几天它已经完全无法使用,当我在编辑器中输入任何内容时Visual Studio抛出一个异常,然后我得到了很多intellisence错误(代码很好,如果我在尝试使用编辑器之前运行,我可以编译它 - 这是日志消息:

  <entry>
    <record>241</record>
    <time>2011/01/25 08:30:34.109</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.InvalidCastException: Unable to cast COM object of type &apos;System.__ComObject&apos; to interface type &apos;Microsoft.VisualStudio.TextManager.Interop.IVsTextReplaceEvents&apos;. This operation failed because the QueryInterface call on the COM component for the interface with IID &apos;{CF9928D9-65AE-4319-A446-94ED5C45ECDE}&apos; failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).&#x000D;&#x000A;   at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, Boolean&amp; pfNeedsRelease)&#x000D;&#x000A;   at Microsoft.VisualStudio.TextManager.Interop.IVsTextReplaceEvents.OnReplace(ChangeInput[] pCI)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.VsTextBufferAdapter.OnTextBufferChangedHighPriority(Object sender, TextContentChangedEventArgs e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)</description>
  </entry>
  <entry>
    <record>242</record>
    <time>2011/01/25 08:30:34.125</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.InvalidCastException: Unable to cast COM object of type &apos;System.__ComObject&apos; to interface type &apos;Microsoft.VisualStudio.Editor.Implementation.IVsTextStreamEvents_Private&apos;. This operation failed because the QueryInterface call on the COM component for the interface with IID &apos;{96FC7D44-BCDD-4F00-AE4D-07E26B2C0E52}&apos; failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).&#x000D;&#x000A;   at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, Boolean&amp; pfNeedsRelease)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.IVsTextStreamEvents_Private.OnChangeStreamText(Int32 iPos, Int32 iOldLen, Int32 iNewLen, Int32 fLast)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.VsTextBufferAdapter.OnTextBufferChanged(Object sender, TextContentChangedEventArgs e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)</description>
  </entry>

2 个答案:

答案 0 :(得分:23)

这似乎可能是由于您的计算机上的注册表中缺少某些信息。如果你转到MS Connect website,你会发现有关这个问题的讨论以及似乎也是一个解决方案。

解决方案(从该页面复制):

使用regedit查看以下密钥:

在32位Windows上:[HKEY_CLASSES_ROOT\CLSID\{73B7DC00-F498-4ABD-AB79-D07AFD52F395}\InProcServer32]
在64位Windows上:[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{73B7DC00-F498-4ABD-AB79-D07AFD52F395}\InProcServer32]

“(默认)”值应为以下之一:
在32位Windows上:"C:\Program Files\Common Files\Microsoft Shared\MSEnv\TextMgrP.dll"
在64位Windows上:"C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\TextMgrP.dll"

答案 1 :(得分:1)

看起来像扩展程序的问题或添加。禁用它们然后逐个重新启用,看看其中一个是否正在运行..