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

Feature Semantic classification is currently unavailable due to an internal error #59736

Open
MrSuttonmann opened this issue Jan 6, 2025 · 4 comments
Labels
analyzer Indicates an issue which is related to analyzer experience area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Comments

@MrSuttonmann
Copy link

Version Used: Visual Studio 2022 (64 bit) - 17.12.3

Error appears in the gold bar at the top of Visual Studio.

StreamJsonRpc.RemoteInvocationException: OverriddenMethod cannot be null.
   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 System.Threading.Tasks.ValueTask`1.get_Result()
   at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.<TryInvokeAsync>d__20`1.MoveNext()
RPC server exception:
System.InvalidOperationException: OverriddenMethod cannot be null.
      at Microsoft.AspNetCore.Shared.MvcFacts.GetDeclaringType(IMethodSymbol method)
      at Microsoft.AspNetCore.Shared.MvcFacts.IsControllerAction(IMethodSymbol method, INamedTypeSymbol nonActionAttribute, IMethodSymbol disposableDispose)
      at Microsoft.AspNetCore.Analyzers.RouteEmbeddedLanguage.Infrastructure.MvcDetector.IsAction(IMethodSymbol methodSymbol, WellKnownTypes wellKnownTypes)
      at Microsoft.AspNetCore.Analyzers.RouteEmbeddedLanguage.Infrastructure.RouteUsageDetector.FindMvcMethod(WellKnownTypes wellKnownTypes, IMethodSymbol methodSymbol)
      at Microsoft.AspNetCore.Analyzers.RouteEmbeddedLanguage.Infrastructure.RouteUsageDetector.BuildContext(RouteOptions routeOptions, SyntaxToken token, SemanticModel semanticModel, WellKnownTypes wellKnownTypes, CancellationToken cancellationToken)
      at Microsoft.AspNetCore.App.Analyzers.Infrastructure.RouteUsageCache.<>c__DisplayClass6_0.<GetAndCache>b__0(SyntaxToken token)
      at Microsoft.AspNetCore.App.Analyzers.Infrastructure.RouteUsageCache.GetAndCache(SyntaxToken syntaxToken, CancellationToken cancellationToken)
      at Microsoft.AspNetCore.Analyzers.RouteEmbeddedLanguage.RoutePatternClassifier.RegisterClassifications(AspNetCoreEmbeddedLanguageClassificationContext context)
      at Microsoft.CodeAnalysis.ExternalAccess.AspNetCore.Internal.EmbeddedLanguages.AspNetCoreEmbeddedLanguageClassifier.RegisterClassifications(EmbeddedLanguageClassificationContext context)
      at Microsoft.CodeAnalysis.Classification.AbstractEmbeddedLanguageClassificationService.Worker.ClassifyToken(SyntaxToken token)
      at Microsoft.CodeAnalysis.Classification.AbstractEmbeddedLanguageClassificationService.Worker.VisitTokens(SyntaxNode node)
      at Microsoft.CodeAnalysis.Classification.AbstractEmbeddedLanguageClassificationService.AddEmbeddedLanguageClassifications(SolutionServices services, Project project, SemanticModel semanticModel, ImmutableArray`1 textSpans, ClassificationOptions options, SegmentedList`1 result, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Classification.AbstractEmbeddedLanguageClassificationService.AddEmbeddedLanguageClassificationsAsync(Document document, ImmutableArray`1 textSpans, ClassificationOptions options, SegmentedList`1 result, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.AddClassificationsInCurrentProcessAsync(Document document, ImmutableArray`1 textSpans, ClassificationType type, ClassificationOptions options, SegmentedList`1 result, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.AddClassificationsAsync(Document document, ImmutableArray`1 textSpans, ClassificationOptions options, ClassificationType type, SegmentedList`1 result, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.RemoteSemanticClassificationService.<>c__DisplayClass20_0.<<GetClassificationsAsync>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.BrokeredServiceBase.RunServiceImplAsync[T](Func`2 implementation, CancellationToken cancellationToken)

@CyrusNajmabadi
Copy link
Member

This is not Roslyn. This is asp.net

@MrSuttonmann
Copy link
Author

This is not Roslyn. This is asp.net

There have been previous similar issues raised in this repository, eg: dotnet/roslyn#67442, dotnet/roslyn#70429, et al.

@CyrusNajmabadi
Copy link
Member

This is not Roslyn. This is asp.net

There have been previous similar issues raised in this repository, eg: dotnet/roslyn#67442, dotnet/roslyn#70429, et al.

Neither of those issues are asp.net. Both are Roslyn. This issue is an issue in asp.net.

@CyrusNajmabadi CyrusNajmabadi transferred this issue from dotnet/roslyn Jan 6, 2025
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Jan 6, 2025
@CyrusNajmabadi
Copy link
Member

Moving to asp.net

@martincostello martincostello added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates analyzer Indicates an issue which is related to analyzer experience and removed untriaged needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer Indicates an issue which is related to analyzer experience area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

No branches or pull requests

3 participants