Skip to content

Commit 3e8ae2f

Browse files
committed
Remove potentially redundant UI switch
If `IVsShellServices` has already been initialised, we won't need the UI thread. Avoid the switch before calling it.
1 parent 35f3965 commit 3e8ae2f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/LanguageServices/LanguageServiceHostEnvironment.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ public LanguageServiceHostEnvironment(IVsShellServices vsShell, JoinableTaskCont
1919
_isEnabled = new(
2020
async () =>
2121
{
22-
await joinableTaskContext.Factory.SwitchToMainThreadAsync();
23-
2422
// If VS is running in command line mode (e.g. "devenv.exe /build my.sln"),
2523
// the language service host is not enabled. The one exception to this is
2624
// when we're populating a solution cache via "/populateSolutionCache".

0 commit comments

Comments
 (0)