dotnet / dotnet/razor

VS2026 gives error bar "Razor SematicTokens Feature" is currently unavailable due to an internal error

Open
#12,487 1 comment 0 reactions 0 assignees View on GitHub
Area-Razor
Dominant language
No language data
Stars
710
Forks
241
Avg merge
18h 41m
Merged PRs (30d)
35

Description

Here's the stacktrace:
StreamJsonRpc.RemoteInvocationException: The requested line number 902 must be less than the number of lines 901. (Parameter 'Line')
at StreamJsonRpc.JsonRpc.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.d__18`1.MoveNext()
RPC server exception:
System.ArgumentOutOfRangeException: The requested line number 902 must be less than the number of lines 901. (Parameter 'Line')
at Microsoft.CodeAnalysis.Remote.Razor.ThrowingErrorLoggerProvider.Logger.Log(LogLevel logLevel, String message, Exception exception)
at Microsoft.CodeAnalysis.Razor.Logging.AbstractLoggerFactory.AggregateLogger.Log(LogLevel logLevel, String message, Exception exception)
at Microsoft.CodeAnalysis.Razor.Logging.ILoggerExtensions.LogError(ILogger logger, Exception exception, String message)
at Microsoft.CodeAnalysis.Razor.SemanticTokens.AbstractRazorSemanticTokensInfoService.GetSemanticTokensAsync(DocumentContext documentContext, LinePositionSpan span, Guid correlationId, Boolean colorBackground, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Razor.SemanticTokens.AbstractRazorSemanticTokensInfoService.GetSemanticTokensAsync(DocumentContext documentContext, LinePositionSpan span, Boolean colorBackground, Guid correlationId, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.Razor.RemoteSemanticTokensService.GetSemanticTokensDataAsync(RemoteDocumentContext context, LinePositionSpan span, Boolean colorBackground, Guid correlationId, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.<>c__DisplayClass7_0`1.<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.RemoteWorkspaceManager.RunServiceAsync[T](ServiceBrokerClient client, Checksum solutionChecksum, Func`2 implementation, CancellationToken cancellationToken)

@davidwengier maybe consider outputting the timestamp of the error and the filename it happened in, too - i could give you the .razor file then, maybe...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.