XamlStyler
XamlStyler copied to clipboard
text buffer error
Describe the bug Microsoft Visual Studio Community 2019 Version 16.5.1 reports System.InvalidOperationException on formatting XAML
To Reproduce Steps to reproduce the behavior:
- When formatting repeatedly
- error (from LOG)
System.InvalidOperationException: Master edit already in progress bei Microsoft.VisualStudio.Text.Implementation.BufferGroup.PerformMasterEdit(ITextBuffer buffer, ISubordinateTextEdit xedit, EditOptions options, Object editTag) bei Microsoft.VisualStudio.Text.Projection.Implementation.ProjectionBuffer.SpanEdit.ReplaceSpans(Int32 position, Int32 spansToReplace, IList1 spansToInsert, EditOptions options, Object editTag) bei Microsoft.VisualStudio.Text.Projection.Implementation.ProjectionBuffer.ReplaceSpans(Int32 position, Int32 spansToReplace, IList1 spansToInsert, EditOptions options, Object editTag) bei Microsoft.VisualStudio.Text.Projection.Implementation.ProjectionBuffer.DeleteSpans(Int32 position, Int32 spansToDelete) bei Microsoft.VisualStudio.Text.Structure.DefaultStructureContextSource.OnTextViewClosed(Object sender, EventArgs e) bei Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent(Object sender, EventHandler eventHandlers) --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde --- bei Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
Expected behavior formatting is done
Screenshots
If applicable, add screenshots to help explain your problem.

External Configuration not available
Version Info (please complete the following information):
- OS: Windows 10 (1909) pro
- Microsoft Visual Studio Community 2019 Version 16.5.1
- XAML Styler: Extension (3.2003.9)
Additional context
Thanks for the detailed bug report!
When formatting repeatedly
If you wait a bit for formatting to complete, and then continue to repeat the action, does the issue still occur? I suspect we might be missing a check somewhere to prevent concurrent batch operations.
I am unable to reproduce this issue. Closing for now due to lack of information needed to help debug, but please reactivate if you are still encountering this on the latest versions of VS and XAML Styler.