dotnet / dotnet/roslyn

Feature 'Diagnostic analyzer runner' is currently unavailable due to an internal error.

Open
#81,335 1 comment 1 reaction 0 assignees View on GitHub
Area-Analyzers
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Feature-Diagnostic-analyzer-runner-is-/10982552)._

---
[severity:It's more difficult to complete my work]
Note that the stack trace is different from other examples of this that I have seen

```
StreamJsonRpc.RemoteInvocationException: The solution does not contain the specified document.
at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__171`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Threading.Tasks.ValueTask`1.get_Result()
at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.<TryInvokeAsync>d__20`1.MoveNext()
RPC server exception:
System.InvalidOperationException: The solution does not contain the specified document.
at Microsoft.CodeAnalysis.Shared.Extensions.ProjectExtensions.GetRequiredDocument(Project project, SyntaxTree tree)
at Microsoft.CodeAnalysis.Workspaces.Diagnostics.DiagnosticAnalysisResultBuilder.AddDiagnostic(Dictionary`2& lazyLocals, SyntaxTree tree, Diagnostic diagnostic)
at Microsoft.CodeAnalysis.Diagnostics.Extensions.<ToResultBuilderMapAsync>g__AddDiagnosticsToResult|8_1(ImmutableArray`1 diagnostics, DiagnosticAnalysisResultBuilder& result, SyntaxTree tree, DocumentId additionalDocumentId, Nullable`1 span, AnalysisKind kind, ImmutableArray`1 diagnosticIdsToFilter)
at Microsoft.CodeAnalysis.Diagnostics.Extensions.ToResultBuilderMapAsync(AnalysisResult analysisResult, ImmutableArray`1 additionalPragmaSuppressionDiagnostics, DocumentAnalysisScope documentAnalysisScope, Project project, ImmutableArray`1 analyzers, SkippedHostAnalyzersInfo skippedAnalyzersInfo, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.<>c__DisplayClass35_0.<<AnalyzeInProcessAsync>g__AnalyzeAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.AnalyzeInProcessAsync(DocumentAnalysisScope documentAnalysisScope, Project project, CompilationWithAnalyzers compilationWithAnalyzers, Boolean logPerformanceInfo, Boolean getTelemetryInfo, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.<>c__DisplayClass34_0.<<ComputeDiagnosticAnalysisResultsInProcessAsync>g__ComputeDiagnosticsForAnalyzersAsync|2>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.ComputeDiagnosticAnalysisResultsInProcessAsync(CompilationWithAnalyzers compilationWithAnalyzers, Project project, ImmutableArray`1 analyzers, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.<>c__DisplayClass49_0.<<ProduceProjectDiagnosticsInProcessAsync>g__GetOrComputeDiagnosticAnalysisResultsAsync|2>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.ProduceProjectDiagnosticsInProcessAsync(Project project, ImmutableHashSet`1 diagnosticIds, ImmutableArray`1 documentIds, ImmutableArray`1 analyzers, Boolean includeLocalDocumentDiagnostics, Boolean includeNonLocalDocumentDiagnostics, Boolean includeProjectNonLocalResult, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService.GetDiagnosticsForIdsAsync(Project project, ImmutableArray`1 documentIds, ImmutableHashSet`1 diagnosticIds, AnalyzerFilter analyzerFilter, Boolean includeLocalDocumentDiagnostics, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.RemoteDiagnosticAnalyzerService.<>c__DisplayClass4_0.<<GetDiagnosticsForIdsAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.<>c__DisplayClass7_0`1.<<RunWithSolutionAsync>g__ProcessSolutionAsync|1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.RunWithSolutionAsync[T](AssetProvider assetProvider, Checksum solutionChecksum, Boolean updatePrimaryBranch, Func`2 implementation, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.RunWithSolutionAsync[T](AssetProvider assetProvider, Checksum solutionChecksum, Boolean updatePrimaryBranch, Func`2 implementation, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.RunWithSolutionAsync[T](Checksum solutionChecksum, Func`2 implementation, CancellationToken cancellationToken)
```

---
### Original Comments

#### Feedback Bot on 10/15/2025, 03:54 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

#### Feedback Bot on 10/15/2025, 00:17 PM:

This issue is currently being investigated. Our team will get back to you if either more information is needed, a workaround is available, or the issue is resolved.

#### Julian Zeh on 11/11/2025, 09:33 PM:

The issue is still present in the newest VS 2026 Insiders version (11206.111).

Contributor guide

Open the contributing guide

Research direction

Start by reading ProjectExtensions.GetRequiredDocument and the DiagnosticAnalysisResultBuilder.AddDiagnostic call shown in the stack trace, then follow the surrounding DiagnosticAnalyzerService and remote diagnostic flow. Reproduce the diagnostic analyzer runner failure and determine how the missing document is handled; done means the runner no longer reports this internal error and the behavior is covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
compilers, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.