diff --git a/src/VisualStudio/Core/Def/Implementation/CodeDefinitionWindow/VisualStudioCodeDefinitionWindowService.cs b/src/VisualStudio/Core/Def/Implementation/CodeDefinitionWindow/VisualStudioCodeDefinitionWindowService.cs index cd16da81f3d3f..7f7702d6effe8 100644 --- a/src/VisualStudio/Core/Def/Implementation/CodeDefinitionWindow/VisualStudioCodeDefinitionWindowService.cs +++ b/src/VisualStudio/Core/Def/Implementation/CodeDefinitionWindow/VisualStudioCodeDefinitionWindowService.cs @@ -42,7 +42,7 @@ private async Task GetVsCodeDefViewAsync() return _lazyCodeDefView; } - _lazyCodeDefView = await _asyncServiceProvider.GetServiceAsync().ConfigureAwait(false); + _lazyCodeDefView = await _asyncServiceProvider.GetServiceAsync().ConfigureAwait(true); return _lazyCodeDefView; } @@ -67,7 +67,7 @@ public async Task SetContextAsync(ImmutableArray l return; } - var vsCodeDefView = await _asyncServiceProvider.GetServiceAsync().ConfigureAwait(false); + var vsCodeDefView = await GetVsCodeDefViewAsync().ConfigureAwait(true); // Switch to the UI thread before using the IVsCodeDefView service await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);