Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument contains duplicate analyzer instances. (Parameter 'analyzers') #76398

Open
tmat opened this issue Dec 12, 2024 · 1 comment
Open

Argument contains duplicate analyzer instances. (Parameter 'analyzers') #76398

tmat opened this issue Dec 12, 2024 · 1 comment
Labels
Area-Analyzers untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@tmat
Copy link
Member

tmat commented Dec 12, 2024

Version 17.13.0 Preview 3.0 [35609.207.main]

After opening ProjectSystem.sln from https://github.com/dotnet/project-system

StreamJsonRpc.RemoteInvocationException: Argument contains duplicate analyzer instances. (Parameter 'analyzers')
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__156`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 Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.<TryInvokeAsync>d__18`1.MoveNext()
RPC server exception:
System.ArgumentException: Argument contains duplicate analyzer instances. (Parameter 'analyzers')
      at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.VerifyAnalyzersArgumentForStaticApis(ImmutableArray`1 analyzers, Boolean allowDefaultOrEmpty)
      at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers..ctor(Compilation compilation, ImmutableArray`1 analyzers, CompilationWithAnalyzersOptions analysisOptions)
      at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer.GetDiagnosticsAsync(ImmutableArray`1 projectAnalyzerIds, ImmutableArray`1 hostAnalyzerIds, Boolean reportSuppressedDiagnostics, Boolean logPerformanceInfo, Boolean getTelemetryInfo, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer.GetNormalPriorityDiagnosticsAsync(ImmutableArray`1 projectAnalyzerIds, ImmutableArray`1 hostAnalyzerIds, Boolean reportSuppressedDiagnostics, Boolean logPerformanceInfo, Boolean getTelemetryInfo, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.RemoteDiagnosticAnalyzerService.<>c__DisplayClass3_0.<<CalculateDiagnosticsAsync>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)
      at Microsoft.CodeAnalysis.Remote.RemoteDiagnosticAnalyzerService.CalculateDiagnosticsAsync(Checksum solutionChecksum, DiagnosticArguments arguments, CancellationToken cancellationToken)
@tmat
Copy link
Member Author

tmat commented Dec 12, 2024

@sharwell fyi

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Analyzers untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Analyzers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

1 participant