dotnet / dotnet/roslyn

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

Open
#85,636 2 comments 0 reactions 0 assignees View on GitHub
Area-Razor
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

.. looks like it's a consequence of the issue i just filed dotnet/roslyn#85635

Anyway, Here's the stacktrace:
StreamJsonRpc.RemoteInvocationException: Range={ Start={ Line=152, Character=0 }, End={ Line=920, Character=7 } }. text.Length=36640. text.Lines.Count=901
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.ArgumentException: Range={ Start={ Line=152, Character=0 }, End={ Line=920, Character=7 } }. text.Length=36640. text.Lines.Count=901
---> System.ArgumentOutOfRangeException: The requested line number 920 must be less than the number of lines 901. (Parameter 'Line')
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetTextSpan(LinePositionSpan span)
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.RangeToTextSpan(Range range, SourceText text)
--- End of inner exception stack trace ---
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.RangeToTextSpan(Range range, SourceText text)
at Microsoft.CodeAnalysis.LanguageServer.Handler.InlayHint.InlayHintHandler.CalculateInlayHintsAsync(Document document, Range range, InlineHintsOptions options, Boolean displayAllOverride, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.LanguageServer.Handler.InlayHint.InlayHintHandler.GetInlayHintsAsync(Document document, TextDocumentIdentifier textDocumentIdentifier, Range range, InlineHintsOptions options, Boolean displayAllOverride, InlayHintCache inlayHintCache, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.Razor.RemoteInlayHintService.GetInlayHintsAsync(RemoteDocumentContext context, InlayHintParams inlayHintParams, Boolean displayAllOverride, 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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.