作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经使用VS2010几周了,但是在过去的几天里,它完全无法使用,当我在编辑器中键入任何内容时,Visual Studio都会引发异常,然后我会遇到很多智能错误(代码很好,我可以编译)如果我在尝试使用编辑器之前先运行它)-这是日志消息:
<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 'System.__ComObject' to interface type 'Microsoft.VisualStudio.TextManager.Interop.IVsTextReplaceEvents'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{CF9928D9-65AE-4319-A446-94ED5C45ECDE}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
 at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, Boolean& pfNeedsRelease)
 at Microsoft.VisualStudio.TextManager.Interop.IVsTextReplaceEvents.OnReplace(ChangeInput[] pCI)
 at Microsoft.VisualStudio.Editor.Implementation.VsTextBufferAdapter.OnTextBufferChangedHighPriority(Object sender, TextContentChangedEventArgs e)
 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 'System.__ComObject' to interface type 'Microsoft.VisualStudio.Editor.Implementation.IVsTextStreamEvents_Private'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{96FC7D44-BCDD-4F00-AE4D-07E26B2C0E52}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
 at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, Boolean& pfNeedsRelease)
 at Microsoft.VisualStudio.Editor.Implementation.IVsTextStreamEvents_Private.OnChangeStreamText(Int32 iPos, Int32 iOldLen, Int32 iNewLen, Int32 fLast)
 at Microsoft.VisualStudio.Editor.Implementation.VsTextBufferAdapter.OnTextBufferChanged(Object sender, TextContentChangedEventArgs e)
 at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)</description>
</entry>
最佳答案
看来这可能是由于计算机注册表中缺少某些信息所致。如果您转到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"
关于visual-studio-2010 - 在编辑器中键入时Visual Studio崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4791519/
我是一名优秀的程序员,十分优秀!