Skip to content

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

@AdmiralSnyder

Description

@AdmiralSnyder

.. looks like it's a consequence of the issue i just filed #12487

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__1711.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.ValueTask1.get_Result()
at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection1.<TryInvokeAsync>d__181.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_01.<<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, Func2 implementation, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.RunWithSolutionAsync[T](AssetProvider assetProvider, Checksum solutionChecksum, Boolean updatePrimaryBranch, Func2 implementation, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Remote.RemoteWorkspaceManager.RunServiceAsync[T](ServiceBrokerClient client, Checksum solutionChecksum, Func2 implementation, CancellationToken cancellationToken)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions