From 0ddfe140b788b824c00fc19b95a66c1cb67ee208 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Fri, 10 Jul 2020 11:12:13 -0700 Subject: [PATCH] Continue on captured context after switching to the main thread --- .../Workspace/VisualStudioActiveDocumentTracker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioActiveDocumentTracker.cs b/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioActiveDocumentTracker.cs index 5e11f5d83ad..5edaf0797f4 100644 --- a/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioActiveDocumentTracker.cs +++ b/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioActiveDocumentTracker.cs @@ -65,7 +65,7 @@ internal class VisualStudioActiveDocumentTracker : ForegroundThreadAffinitizedOb { await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); - var monitorSelectionService = (IVsMonitorSelection)await asyncServiceProvider.GetServiceAsync(typeof(SVsShellMonitorSelection)).ConfigureAwait(false); + var monitorSelectionService = (IVsMonitorSelection)await asyncServiceProvider.GetServiceAsync(typeof(SVsShellMonitorSelection)).ConfigureAwait(true); if (ErrorHandler.Succeeded(monitorSelectionService.GetCurrentElementValue((uint)VSConstants.VSSELELEMID.SEID_DocumentFrame, out var value))) { -- GitLab