Visual studio 遇到异常。这可能是由于Visual Studio 2013中的扩展导致的

Visual studio 遇到异常。这可能是由于Visual Studio 2013中的扩展导致的,visual-studio,visual-studio-2013,Visual Studio,Visual Studio 2013,我使用的是VS-2013 Premium升级版3。在调试代码和尝试单步执行时,我收到以下错误消息框: 遇到异常。这可能是由扩展引起的 当输入日志文件(消息中提到了路径)时,我会遇到以下异常: 920 2016/11/02 08:21:03.224 错误 编辑器或编辑器扩展 System.InvalidOperationException:调用EndBatchUpdate时未调用BeginBatchUpdate ; 在Microsoft.VisualStudio.Tex

我使用的是VS-2013 Premium升级版3。在调试代码和尝试单步执行时,我收到以下错误消息框: 遇到异常。这可能是由扩展引起的

当输入日志文件(消息中提到了路径)时,我会遇到以下异常:


920
2016/11/02 08:21:03.224
错误
编辑器或编辑器扩展
System.InvalidOperationException:调用EndBatchUpdate时未调用BeginBatchUpdate
;
在Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.EndBatchUpdate()和#x000D
;
在Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.EndBatchUpdate()和#x000D
;
在Microsoft.VisualStudio.Editor.Implementation.MarkerType.UpdateMarkerFormat(字符串markerName,ICClassificationType classificationType)和35; x000D
;
在Microsoft.VisualStudio.Editor.Implementation.MarkerType.EnsureLazyStateInitialized()和#x000D
;
在Microsoft.VisualStudio.Editor.Implementation.MarkerManager.GetErrorTags(NormalizedSnapshotSpanCollection span)和#x000D
;
在Microsoft.VisualStudio.Editor.Implementation.MarkerManager.ErrorTaggerImplementation.GetTags(NormalizedSnapshotSpanCollection span)和35; x000D
;
位于Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GetTagsForBufferd_u5.MoveNext()
同一条目出现4次以上。即使我已删除组件缓存模型,但问题仍未解决:

C:\Users\User name\AppData\Local\Microsoft\VisualStudio\12.0

其他错误如下:


891
2016/11/02 08:21:02.023
错误
编辑器或编辑器扩展
System.InvalidOperationException:IWPTextView.TextViewLines无效
;
在Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.Microsoft.VisualStudio.Text.Editor.IWpfTextView.get_TextViewLines()
;
在Microsoft.VisualStudio.Text.AdormentLibrary.TextMarkers.Implementation.TextMarkerVisualManager.OnFormatMappingChanged(对象发送方,FormatItemsEventArgs e)和#x000D
;在System.EventHandler`1.Invoke(对象发送方,TEventArgs e)和#x000D
;
在Microsoft.VisualStudio.Text.Classification.Implementation.ViewSpecificFormatMap.EditorFormatMapChanged(对象发送方,FormatItemsEventArgs e)和35; x000D
;在System.EventHandler`1.Invoke(对象发送方,TEventArgs e)和#x000D
;
在Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.SendChangedEvent()和#x000D
;
在Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.SetProperties(字符串键、资源字典属性)和#x000D
;在Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.SetExplicitTextProperties(ICClassificationType classificationType,TextFormattingRunProperties属性)和#x000D
;在Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.AddExplicitTextProperties(ICClassificationType classificationType,TextFormattingRunProperties属性,ICClassificationType优先级)和#x000D
;在Microsoft.VisualStudio.Editor.Implementation.FontsAndColorsHelper.UpdateLegacyMarkerClassification(ICClassificationFormatMap ClassificationMap,ICClassificationType classificationType,ColorableItemInfo[]info)和#x000D
;
在Microsoft.VisualStudio.Editor.Implementation.MarkerType.UpdateMarkerFormat(字符串markerName,ICClassificationType classificationType)和35; x000D
;在Microsoft.VisualStudio.Editor.Implementation.MarkerType.EnsureLazyStateInitialized()和#x000D
;
在Microsoft.VisualStudio.Editor.Implementation.MarkerManager.GetClassificationTagsd_uu15.MoveNext()和#x000D
;
位于Microsoft.VisualStudio.Editor.Implementation.TextMarkerViewTagger.GetTagsd_uu0.MoveNext()
;
位于Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GetTagsForBufferd_u5.MoveNext()
853
2016/11/02 08:19:10.020
错误
彩色主题服务
颜色'弹出窗口'在类别'DE7B121-99a4-4708-aedf-15f40c9b332f'不存在。
878
2016/11/02 08:19:12.567
错误
扩展管理器
由于具有相同ID的扩展'Microsoft.Windows.DevelopmentKit.Desktop'已加载到C:\PROGRAM FILES(X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.0\DESKTOP SDK\。。。
C:\PROGRAM FILES(X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.1\DESKTOP SDK\
转到工具-->扩展,从这里更新并禁用所有添加。重新启动VisualStudio。 问题会解决的。
希望这能对其他人有所帮助。

自从提出这个问题多年后,我遇到了这个问题。所以,这个答案适用于那些使用VisualStudio2019的人

你所要做的就是:
Extensions>manageextensions>Updates>updateall/Update[你想要的]

还建议更新Visual Studio本身(如果有可用的更新)


注意:扩展菜单位于
工具
窗口
之间,看起来不像是扩展错误。这个问题相当模糊,没有什么可看的,也没有复制代码。Fwiw,您如何调试显然也需要红色曲线来指示语法错误的代码很难猜测。如果您无法接受,您必须致电Microsoft支持部门,但他们会首先要求您安装更新4和5,所以请先安装。按Windows+R转到运行。键入Devenv.exe/SafeMode@Dutt93这有助于我在不重新启动机器的情况下解决问题,谢谢。:)