我使用VS-2013 Premium與更新3一起運行。在調試代碼時嘗試插入時,出現錯誤消息框: 有一個異常遇到過。這可能是由一個擴展引起遇到異常。這可能是由於Visual Studio 2013中的擴展導致的
當進入日誌文件(路徑上的消息中提到),我得到這個異常:
<entry>
<record>920</record>
<time>2016/11/02 08:21:03.224</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.InvalidOperationException: EndBatchUpdate called without BeginBatchUpdate being called

在Microsoft.VisualStudio.Text.Classification.Implementation .EditorFormatMap.EndBatchUpdate()&#x000D;&#x000A;
at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.EndBatchUpdate()&#x000D;&#x000A;
at Microsoft.VisualStudio.Editor.Implementation.MarkerType.UpdateMarkerFormat(String markerName,IClassificationType classificationType)&#x000D;&#x000A;在Microsoft.VisualStudio.Editor.Implementation.MarkerType.EnsureLazyStateInitialized()&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.MarkerManager.GetErrorTags(NormalizedSnapshotSpanCollection跨度)&#x000D;&#x000A;在Microsoft.VisualStudio.Editor.Implementation.MarkerManager.ErrorTaggerImplementation.GetTags(NormalizedSnapshotSpanCollection跨度)&#x000D;&#x000A;在Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1。 <GetTagsForBuffer> d__5.MoveNext()
同樣的入口出現了4次以上。連我都刪除了部分緩存模式,但問題沒有得到解決:
C:\用戶\用戶名\應用程序數據\本地\微軟\ VisualStudio的\ 12.0
其他錯誤情況如下: 2016/11/02 08:21:02.023 錯誤 編輯器或編輯器擴展 System.InvalidOperationException:IWpfTextView.TextViewLines無效。&#x000D;&#x000A;在Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.Microsoft.VisualStudio.Text.Editor.IWpfTextView.get_TextViewLines()&#x000D;&#x000A;在Microsoft.VisualStudio.Text.AdornmentLibrary.TextMarkers.Implementation.TextMarkerVisualManager.OnFormatMappingChanged(Object sender,FormatItemsEventArgs e)&#x000D;&#x000A;在System.EventHandler 1.Invoke(Object sender, TEventArgs e)
 at Microsoft.VisualStudio.Text.Classification.Implementation.ViewSpecificFormatMap.EditorFormatMapChanged(Object sender, FormatItemsEventArgs e)
 at System.EventHandler
1.Invoke(Object sender,TEventArgs e)&#x000D;&#x000A;在Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.SendChangedEvent()&#x000D;&#x000A;在Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.SetProperties(String key,ResourceDictionary屬性)&#x000D;&#x000A;在Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.SetExplicitTextProperties(IClassificationType classificationType,TextFormattingRunProperties屬性)&#x000D;&#x000A;在Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.AddExplicitTextProperties(IClassificationType classificationType,TextFormattingRunProperties properties,IClassificationType priority)&#x000D;&#x000A;在Microsoft.VisualStudio.Editor.Implementation.FontsAndColorsHelper.UpdateLegacyMarkerClassification(IClassificationFormatMap classificationFormatMap,IClassificationType classificationType,ColorableItemInfo [] info)&#x000D;&#x000A;在Microsoft.VisualStudio.Editor.Implementation.MarkerType.UpdateMarkerFormat(String markerName,IClassificationType classificationType)&#x000D;&#x000A;在Microsoft.VisualStudio.Editor.Implementation.MarkerType.EnsureLazyStateInitialized()&#x000D;&#x000A;在Microsoft.VisualStudio.Editor.Implementation.MarkerManager。 <GetClassificationTags> d__15.MoveNext()&#x000D;&#x000A;在Microsoft.VisualStudio.Editor.Implementation.TextMarkerViewTagger。 <GetTags> d__0.MoveNext()&#x000D;&#x000A;在Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1。 <GetTagsForBuffer> d__5。的MoveNext()
<entry>
<record>853</record>
<time>2016/11/02 08:19:10.020</time>
<type>Error</type>
<source>Color Theme Service</source>
<description>The color 'Popup' in category 'de7b1121-99a4-4708-aedf-15f40c9b332f' does not exist.</description>
<entry>
<record>878</record>
<time>2016/11/02 08:19:12.567</time>
<type>Error</type>
<source>Extension Manager</source>
<description>Extension will not be loaded because an extension with the same ID 'Microsoft.Windows.DevelopmentKit.Desktop' is already loaded at C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.0\DESKTOP SDK\...</description>
<path>C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.1\DESKTOP SDK\</path>
這看起來不像是一個擴展錯誤。很晦澀的問題,沒有什麼可看,也沒有repro代碼。 Fwiw,你如何調試那些顯然也需要紅色小波來表示語法錯誤的代碼是很難猜測的。如果您不能忍受它,您必須致電Microsoft支持人員,但他們首先會要求您安裝更新4和5,以便首先安裝。 –