From cfbec587c60f01dcff3476687e1f45a8fd960571 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 21 Apr 2025 14:51:33 -0700 Subject: [PATCH 1/5] Catch and report when we are unable to make an invisible editor --- .../Def/ProjectSystem/VisualStudioWorkspaceImpl.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs b/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs index eef19e6672958..489337b1beab2 100644 --- a/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs +++ b/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs @@ -1212,8 +1212,14 @@ private void ApplyTextDocumentChange(DocumentId documentId, SourceText newText) } // The document wasn't open in a normal way, so invisible editor time - using var invisibleEditor = OpenInvisibleEditor(documentId); - TextEditApplication.UpdateText(newText, invisibleEditor.TextBuffer, EditOptions.None); + try + { + using var invisibleEditor = OpenInvisibleEditor(documentId); + TextEditApplication.UpdateText(newText, invisibleEditor.TextBuffer, EditOptions.None); + } + catch (System.Runtime.InteropServices.COMException ex) when (FatalError.ReportAndCatch(ex)) + { + } } } From 451f8ac9e9f0dc9d4a2ac882b4785b6ef5989418 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 22 Apr 2025 11:54:39 -0700 Subject: [PATCH 2/5] Report issue using info bar if we can't change a file --- .../VisualStudioWorkspaceImpl.cs | 90 +++++++++++++++---- .../Core/Def/ServicesVSResources.resx | 9 ++ .../Telemetry/TelemetryFeatureName.cs | 7 +- 3 files changed, 84 insertions(+), 22 deletions(-) diff --git a/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs b/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs index 489337b1beab2..cca7bb3d011ed 100644 --- a/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs +++ b/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs @@ -9,6 +9,7 @@ using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; +using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -112,6 +113,12 @@ internal abstract partial class VisualStudioWorkspaceImpl : VisualStudioWorkspac private readonly IAsynchronousOperationListener _workspaceListener; private bool _isExternalErrorDiagnosticUpdateSourceSubscribedToSolutionBuildEvents; + /// + /// Only read/written on hte UI thread. + /// + private bool _isShowingDocumentChangeErrorInfoBar = false; + private bool _ignoreDocumentTextChangeErrors; + public VisualStudioWorkspaceImpl(ExportProvider exportProvider, IAsyncServiceProvider asyncServiceProvider) : base(VisualStudioMefHostServices.Create(exportProvider)) { @@ -1192,35 +1199,80 @@ protected override void ApplyAnalyzerConfigDocumentTextChanged(DocumentId docume private void ApplyTextDocumentChange(DocumentId documentId, SourceText newText) { - var containedDocument = ContainedDocument.TryGetContainedDocument(documentId); + this._threadingContext.ThrowIfNotOnUIThread(); - if (containedDocument != null) - { - containedDocument.UpdateText(newText); - } - else + CodeAnalysis.TextDocument? document = null; + + try { - if (IsDocumentOpen(documentId)) - { - var textBuffer = this.CurrentSolution.GetTextDocument(documentId)!.GetTextSynchronously(CancellationToken.None).Container.TryGetTextBuffer(); + document = this.CurrentSolution.GetRequiredTextDocument(documentId); - if (textBuffer != null) + var containedDocument = ContainedDocument.TryGetContainedDocument(documentId); + if (containedDocument != null) + { + containedDocument.UpdateText(newText); + } + else + { + if (IsDocumentOpen(documentId)) { - TextEditApplication.UpdateText(newText, textBuffer, EditOptions.DefaultMinimalChange); - return; + var textBuffer = document.GetTextSynchronously(CancellationToken.None).Container.TryGetTextBuffer(); + if (textBuffer != null) + { + TextEditApplication.UpdateText(newText, textBuffer, EditOptions.DefaultMinimalChange); + return; + } } - } - // The document wasn't open in a normal way, so invisible editor time - try - { + // The document wasn't open in a normal way, so invisible editor time using var invisibleEditor = OpenInvisibleEditor(documentId); TextEditApplication.UpdateText(newText, invisibleEditor.TextBuffer, EditOptions.None); } - catch (System.Runtime.InteropServices.COMException ex) when (FatalError.ReportAndCatch(ex)) - { - } } + catch (Exception ex) when (FatalError.ReportAndCatch(ex)) + { + ReportErrorChangingDocumentText(ex); + } + + void ReportErrorChangingDocumentText(Exception exception) + { + // Don't spam the info bar. If the user already has a message up, leave it at that. Also, + // if they've asked to not be notified about future doc change issue, respect that flag. + if (_ignoreDocumentTextChangeErrors || _isShowingDocumentChangeErrorInfoBar) + return; + + var documentName = document?.Name ?? documentId.ToString(); + + var errorReportingService = this.Services.GetRequiredService(); + errorReportingService.ShowGlobalErrorInfo( + message: string.Format(ServicesVSResources.Error_encountered_updating_0, documentName), + TelemetryFeatureName.Workspace, + exception, + // 'Show stack trace' will not dismiss the info bar. + new InfoBarUI(WorkspacesResources.Show_Stack_Trace, InfoBarUI.UIKind.HyperLink, + () => errorReportingService.ShowDetailedErrorInfo(exception), closeAfterAction: false), + // 'Ignore' just closes the info bar, but allows future errors to show up. + new InfoBarUI(ServicesVSResources.Ignore, InfoBarUI.UIKind.Button, GetDefaultDismissAction()), + // 'Ignore (including future errors) closes the info bar, but also sets the flag so the user gets no more messages + // in the current session. + new InfoBarUI(ServicesVSResources.Ignore_including_future_errors, InfoBarUI.UIKind.Button, GetDefaultDismissAction( + () => _ignoreDocumentTextChangeErrors = true)), + // Close button is the same as 'ignore'. It closes the info bar, but allows future errors to show up. + new InfoBarUI(string.Empty, InfoBarUI.UIKind.Close, GetDefaultDismissAction())); + + // Mark that we're showing the info bar at this point. + _isShowingDocumentChangeErrorInfoBar = true; + } + + Action GetDefaultDismissAction(Action? additionalAction = null) + => () => + { + additionalAction?.Invoke(); + + // All info bar actions (except for 'show stack trace') dismiss the info bar, putting us back in the + // "we're not showing the user anything" state. + _isShowingDocumentChangeErrorInfoBar = false; + }; } protected override void ApplyDocumentInfoChanged(DocumentId documentId, DocumentInfo updatedInfo) diff --git a/src/VisualStudio/Core/Def/ServicesVSResources.resx b/src/VisualStudio/Core/Def/ServicesVSResources.resx index 26238f9c4a5e1..74b583264d6cd 100644 --- a/src/VisualStudio/Core/Def/ServicesVSResources.resx +++ b/src/VisualStudio/Core/Def/ServicesVSResources.resx @@ -1879,4 +1879,13 @@ Additional information: {1} Show completion list after a character is typed + + Error encountered updating '{0}' + + + Ignore + + + Ignore (including future errors) + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/Telemetry/TelemetryFeatureName.cs b/src/Workspaces/Core/Portable/Telemetry/TelemetryFeatureName.cs index a7827976d7905..4b07d41a2a94a 100644 --- a/src/Workspaces/Core/Portable/Telemetry/TelemetryFeatureName.cs +++ b/src/Workspaces/Core/Portable/Telemetry/TelemetryFeatureName.cs @@ -17,10 +17,11 @@ internal readonly struct TelemetryFeatureName // Local services: - public static readonly TelemetryFeatureName CodeFixProvider = GetClientFeatureName("CodeFixProvider"); - public static readonly TelemetryFeatureName InlineRename = GetClientFeatureName("InlineRename"); + public static readonly TelemetryFeatureName CodeFixProvider = GetClientFeatureName(nameof(CodeFixProvider)); + public static readonly TelemetryFeatureName InlineRename = GetClientFeatureName(nameof(InlineRename)); public static readonly TelemetryFeatureName LegacySuppressionFix = GetClientFeatureName("TelemetryFeatureName"); - public static readonly TelemetryFeatureName VirtualMemoryNotification = GetClientFeatureName("VirtualMemoryNotification"); + public static readonly TelemetryFeatureName VirtualMemoryNotification = GetClientFeatureName(nameof(VirtualMemoryNotification)); + public static readonly TelemetryFeatureName Workspace = GetClientFeatureName(nameof(Workspace)); private readonly string _name; private readonly string _kind; From 5b1a64d8f744fb812e9320f963d3923a62c742ec Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 22 Apr 2025 11:55:51 -0700 Subject: [PATCH 3/5] Simplify --- .../Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs b/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs index cca7bb3d011ed..dc9080769580d 100644 --- a/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs +++ b/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs @@ -1249,16 +1249,16 @@ void ReportErrorChangingDocumentText(Exception exception) TelemetryFeatureName.Workspace, exception, // 'Show stack trace' will not dismiss the info bar. - new InfoBarUI(WorkspacesResources.Show_Stack_Trace, InfoBarUI.UIKind.HyperLink, + new(WorkspacesResources.Show_Stack_Trace, InfoBarUI.UIKind.HyperLink, () => errorReportingService.ShowDetailedErrorInfo(exception), closeAfterAction: false), // 'Ignore' just closes the info bar, but allows future errors to show up. - new InfoBarUI(ServicesVSResources.Ignore, InfoBarUI.UIKind.Button, GetDefaultDismissAction()), + new(ServicesVSResources.Ignore, InfoBarUI.UIKind.Button, GetDefaultDismissAction()), // 'Ignore (including future errors) closes the info bar, but also sets the flag so the user gets no more messages // in the current session. - new InfoBarUI(ServicesVSResources.Ignore_including_future_errors, InfoBarUI.UIKind.Button, GetDefaultDismissAction( + new(ServicesVSResources.Ignore_including_future_errors, InfoBarUI.UIKind.Button, GetDefaultDismissAction( () => _ignoreDocumentTextChangeErrors = true)), // Close button is the same as 'ignore'. It closes the info bar, but allows future errors to show up. - new InfoBarUI(string.Empty, InfoBarUI.UIKind.Close, GetDefaultDismissAction())); + new(string.Empty, InfoBarUI.UIKind.Close, GetDefaultDismissAction())); // Mark that we're showing the info bar at this point. _isShowingDocumentChangeErrorInfoBar = true; From 8d1b410b5da7dab6e7460ea428deb7c740e6cbf9 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 22 Apr 2025 12:09:48 -0700 Subject: [PATCH 4/5] Add resource strings --- .../Core/Def/xlf/ServicesVSResources.cs.xlf | 15 +++++++++++++++ .../Core/Def/xlf/ServicesVSResources.de.xlf | 15 +++++++++++++++ .../Core/Def/xlf/ServicesVSResources.es.xlf | 15 +++++++++++++++ .../Core/Def/xlf/ServicesVSResources.fr.xlf | 15 +++++++++++++++ .../Core/Def/xlf/ServicesVSResources.it.xlf | 15 +++++++++++++++ .../Core/Def/xlf/ServicesVSResources.ja.xlf | 15 +++++++++++++++ .../Core/Def/xlf/ServicesVSResources.ko.xlf | 15 +++++++++++++++ .../Core/Def/xlf/ServicesVSResources.pl.xlf | 15 +++++++++++++++ .../Core/Def/xlf/ServicesVSResources.pt-BR.xlf | 15 +++++++++++++++ .../Core/Def/xlf/ServicesVSResources.ru.xlf | 15 +++++++++++++++ .../Core/Def/xlf/ServicesVSResources.tr.xlf | 15 +++++++++++++++ .../Core/Def/xlf/ServicesVSResources.zh-Hans.xlf | 15 +++++++++++++++ .../Core/Def/xlf/ServicesVSResources.zh-Hant.xlf | 15 +++++++++++++++ 13 files changed, 195 insertions(+) diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf index c0cf5e57da1f1..93343aa29da77 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf @@ -412,6 +412,11 @@ Celé řešení a externí zdroje + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} Chyba při aktualizaci potlačení: {0} @@ -517,6 +522,16 @@ ID + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces Implementovaná rozhraní diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf index 6b22dba31cd9f..238ccbc890583 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf @@ -412,6 +412,11 @@ Gesamte Projektmappe und externe Quellen + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} Fehler bei der Aktualisierung von Unterdrückungen: {0} @@ -517,6 +522,16 @@ ID + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces Implementierte Schnittstellen diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf index 672a4438de516..e97aedc348e2d 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf @@ -412,6 +412,11 @@ Solución completa y orígenes externos + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} Actualización de errores de forma periódica: {0} @@ -517,6 +522,16 @@ Id. + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces Interfaces implementadas diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf index c595c0aca3fb7..832badf4373db 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf @@ -412,6 +412,11 @@ Solution entière et sources externes + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} Erreur lors de la mise à jour des suppressions : {0} @@ -517,6 +522,16 @@ ID + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces Interfaces implémentées diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf index 6eb0a055e1c8e..49c8da4985737 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf @@ -412,6 +412,11 @@ Intera soluzione e origini esterne + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} Errore durante l'aggiornamento delle eliminazioni: {0} @@ -517,6 +522,16 @@ ID + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces Interfacce implementate diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf index 24cf1b73246b3..c730e80b8fdd1 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf @@ -412,6 +412,11 @@ ソリューションと外部ソース全体 + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} 抑制の更新でエラーが発生しました: {0} @@ -517,6 +522,16 @@ ID + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces 実装されたインターフェイス diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf index efaea1089f353..a5bab91228241 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf @@ -412,6 +412,11 @@ 전체 솔루션 및 외부 원본 + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} 표시 중지를 업데이트하는 동안 오류가 발생했습니다. {0} @@ -517,6 +522,16 @@ ID + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces 구현된 인터페이스 diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf index 703fc107fed11..9dc33343730df 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf @@ -412,6 +412,11 @@ Całe rozwiązanie i źródła zewnętrzne + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} Błąd podczas pomijania aktualizacji: {0} @@ -517,6 +522,16 @@ Identyfikator + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces Wdrożone interfejsy diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf index 28994743218b1..8a10cc83cb598 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf @@ -412,6 +412,11 @@ Solução Inteira e Fontes Externas + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} Erro ao atualizar supressões: {0} @@ -517,6 +522,16 @@ ID + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces Interfaces implementadas diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf index dea24751cc072..34e93760d7a17 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf @@ -412,6 +412,11 @@ Все решение и внешние источники + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} Ошибка при обновлении подавлений: {0} @@ -517,6 +522,16 @@ ИД + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces Реализованные интерфейсы diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf index ef23090f2454a..8bf30ab2888be 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf @@ -412,6 +412,11 @@ Tam Çözüm ve Dış Kaynaklar + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} Gizlemeler güncellenirken hata oluştu: {0} @@ -517,6 +522,16 @@ Kimlik + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces Uygulanan arabirimler diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf index 2a6cebedfc557..7a70e723af51c 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf @@ -412,6 +412,11 @@ 整个解决方案和外部源 + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} 更新抑制时出现错误: {0} @@ -517,6 +522,16 @@ ID + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces 实现的接口 diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf index a4263d1a4562d..9ad256b581334 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf @@ -412,6 +412,11 @@ 整個解決方案與外部來源 + + Error encountered updating '{0}' + Error encountered updating '{0}' + + Error updating suppressions: {0} 更新歸併時發生錯誤: {0} @@ -517,6 +522,16 @@ 識別碼 + + Ignore + Ignore + + + + Ignore (including future errors) + Ignore (including future errors) + + Implemented interfaces 已實作的介面 From 318c5ffce5f53d0474d560374353270f826841ea Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 22 Apr 2025 12:10:55 -0700 Subject: [PATCH 5/5] Add return --- .../Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs b/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs index dc9080769580d..1e1e81f0cb90d 100644 --- a/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs +++ b/src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs @@ -1232,6 +1232,7 @@ private void ApplyTextDocumentChange(DocumentId documentId, SourceText newText) catch (Exception ex) when (FatalError.ReportAndCatch(ex)) { ReportErrorChangingDocumentText(ex); + return; } void ReportErrorChangingDocumentText(Exception exception)