diff --git a/src/Workspaces/Remote/Core/ServiceHubRemoteHostClient.cs b/src/Workspaces/Remote/Core/ServiceHubRemoteHostClient.cs index b031f15af06e6..826ebbcbd3216 100644 --- a/src/Workspaces/Remote/Core/ServiceHubRemoteHostClient.cs +++ b/src/Workspaces/Remote/Core/ServiceHubRemoteHostClient.cs @@ -163,6 +163,9 @@ public override async ValueTask> CreateConnectionAsyn var descriptor = ServiceDescriptors.GetServiceDescriptor(typeof(T), RemoteHostOptions.IsServiceHubProcess64Bit(_services)); + // Make sure we are on the thread pool to avoid UI thread dependencies if external code uses ConfigureAwait(true) + await TaskScheduler.Default; + #pragma warning disable ISB001 // Dispose of proxies - BrokeredServiceConnection takes care of disposal var proxy = await _serviceBroker.GetProxyAsync(descriptor, options, cancellationToken).ConfigureAwait(false); #pragma warning restore