Razor: VS error bar "Razor SemanticTokens Feature" is currently unavailable due to an internal error
Area-IDE
**Version Used**:
VS 2026 18.7.0
this hasn't happened (afaicr) in the previous version
**Steps to Reproduce**:
I just opened a .razor file, but can't remember which one, sadly ... maybe that error window should contain the file the error happened in...
<img width="1333" height="660" alt="Image" src="https://github.com/user-attachments/assets/8391a5ae-a3b1-4efb-85e4-a02ddea004c0" />
**Stack Trace**:
```
StreamJsonRpc.RemoteInvocationException: End: (28,0) matches or exceeds SourceText boundary 18.
at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__177`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__18`1.MoveNext()
RPC server exception:
System.InvalidOperationException: End: (28,0) matches or exceeds SourceText boundary 18.
at Microsoft.AspNetCore.Razor.ThrowHelper.ThrowInvalidOperationException[T](String message)
at Microsoft.CodeAnalysis.Text.SourceTextExtensions.<GetTextSpan>g__GetAbsoluteIndex|24_0(SourceText text, Int32 line, Int32 character, String name)
at Microsoft.CodeAnalysis.Text.SourceTextExtensions.GetTextSpan(SourceText text, Int32 startLine, Int32 startCharacter, Int32 endLine, Int32 endCharacter)
at Microsoft.CodeAnalysis.Text.SourceTextExtensions.GetTextSpan(SourceText text, LinePosition start, LinePosition end)
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, Guid correlationId, CancellationToken cancellationToken)
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.RemoteWorkspaceManager.RunServiceAsync[T](ServiceBrokerClient client, Checksum solutionChecksum, Func`2 implementation, CancellationToken cancellationToken)
```
**file content**
```
```
**Expected Behavior**:
**Actual Behavior**:
1 条评论