ある日突然ですが、IDEがこんなエラーを発するようになりました。

(ユーザ名のところは消しています)
エラーが発生すると、単語単位で変更される予約語の配色とか、エラーがある部分に対する波線とかが崩れてしまいます。

エラーメッセージに書いてあるActivityLog.xmlをブラウザで開くとエラー内容が記録されています。

System.InvalidCastException: 型 ‘System.__ComObject’ の COM オブジェクトをインターフェイス型 ‘Microsoft.VisualStudio.Editor.Implementation.IVsTextStreamEvents_Private’ にキャストできません。IID ‘{96FC7D44-BCDD-4F00-AE4D-07E26B2C0E52}’ が指定されたインターフェイスの COM コンポーネント上での QueryInterface 呼び出しのときに次のエラーが発生したため、この操作に失敗しました: インターフェイスがサポートされていません (HRESULT からの例外: 0x80004002 (E_NOINTERFACE))。 場所 System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease) 場所 Microsoft.VisualStudio.Editor.Implementation.IVsTextStreamEvents_Private.OnChangeStreamText(Int32 iPos, Int32 iOldLen, Int32 iNewLen, Int32 fLast) 場所 Microsoft.VisualStudio.Editor.Implementation.VsTextBufferAdapter.OnTextBufferChanged(Object sender, TextContentChangedEventArgs e) 場所 Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)
上記エラーコードとIIDを検索するとKBでこんなものがヒットしました。
「Visual Studio 2010 crashes after installing MSDN Library for Visual Studio 2008」
英語ですが、内容としては「レジストリがぶっ飛んでるから、再登録して」ということみたいです。
対象はVS2010となっていますが、VS2012でも同じ対応で問題ありませんでした。
OSによりレジストリの位置と登録内容が若干異なります。
○32-Bit Windows
・レジストリの位置
[HKEY_CLASSES_ROOT\CLSID\{73B7DC00-F498-4ABD-AB79-D07AFD52F395}\InProcServer32]
・登録内容:「(規定)」に以下の内容を登録します。
C:\Program Files\Common Files\Microsoft Shared\MSEnv\TextMgrP.dll
○64-Bit Windows
・レジストリの位置
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{73B7DC00-F498-4ABD-AB79-D07AFD52F395}\InProcServer32]
・登録内容
C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\TextMgrP.dll
VSの再インストールでも対処できるのですが、さすがに再インストールは大変ですので、まずはこちらの手順でどうぞ。