diff --git a/src/VisualStudio/Core/Def/TaskList/VisualStudioTaskListService.cs b/src/VisualStudio/Core/Def/TaskList/VisualStudioTaskListService.cs index 036f16142b5d0..2fb22432dafa4 100644 --- a/src/VisualStudio/Core/Def/TaskList/VisualStudioTaskListService.cs +++ b/src/VisualStudio/Core/Def/TaskList/VisualStudioTaskListService.cs @@ -101,7 +101,7 @@ private async Task StartAsync(VisualStudioWorkspace workspace) _ = new VisualStudioTaskListTable(workspace, _threadingContext, _tableManagerProvider, this); // Now that we've hooked everything up, kick off the work to actually start computing and reporting items. - RegisterIncrementalAnalayzerAndStartComputingTaskListItems(); + RegisterIncrementalAnalyzerAndStartComputingTaskListItems(); } catch (OperationCanceledException) { @@ -149,13 +149,17 @@ public ImmutableArray GetTaskListItems(Workspace workspace, Docume ? values : ImmutableArray.Empty; - private void RegisterIncrementalAnalayzerAndStartComputingTaskListItems() + private void RegisterIncrementalAnalyzerAndStartComputingTaskListItems() { // If we're in pull-diagnostics mode, then todo-comments will be handled by LSP. var diagnosticMode = _globalOptions.GetDiagnosticMode(); if (diagnosticMode == DiagnosticMode.LspPull) return; + // Do not register if solution crawler is explicitly off. + if (!_globalOptions.GetOption(SolutionCrawlerRegistrationService.EnableSolutionCrawler)) + return; + var services = _workspace.Services.SolutionServices; var registrationService = services.GetRequiredService(); var analyzerProvider = new TaskListIncrementalAnalyzerProvider(_globalOptions, this);