diff --git a/src/EditorFeatures/Core/Implementation/CodeActions/CodeActionEditHandlerService.cs b/src/EditorFeatures/Core/Implementation/CodeActions/CodeActionEditHandlerService.cs index 979e302d2f88b0ae72317c954d6c9349023b9945..f90dff189960bb0667ff0250082b6deb15d45f05 100644 --- a/src/EditorFeatures/Core/Implementation/CodeActions/CodeActionEditHandlerService.cs +++ b/src/EditorFeatures/Core/Implementation/CodeActions/CodeActionEditHandlerService.cs @@ -115,6 +115,8 @@ public ITextBufferAssociatedViewService AssociatedViewService { foreach (var document in project.Documents) { + // ConfigureAwait(true) so we come back to the same thread as + // we do all application on the UI thread. if (!await document.HasAnyErrorsAsync(cancellationToken).ConfigureAwait(true)) { documentErrorLookup.Add(document.Id);