Razor intellisense doesn't work in Ubuntu 19.10
See original GitHub issueEnvironment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 3.1.100
Commit: cd82f021f4
Runtime Environment: OS Name: ubuntu OS Version: 19.10 OS Platform: Linux RID: ubuntu.19.10-x64 Base Path: /usr/share/dotnet/sdk/3.1.100/
Host (useful for support): Version: 3.1.0 Commit: 157910edee
.NET Core SDKs installed: 3.1.100 [/usr/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.App 3.1.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
VS Code version: 1.41.1 C# Extension version: 1.21.9
Steps to reproduce
-
Open Visual Studio Code
-
Generate dotnet new mvc
-
Try to edit .cshtml file, there should be some intellisense from Razor but there is only error: [Error - 4:38:49 AM] Request textDocument/completion failed. Message: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter ‘index’) at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index) at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position) at Microsoft.AspNetCore.Razor.LanguageServer.Completion.RazorCompletionEndpoint.Handle(CompletionParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionEndpoint.cs:line 112 at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline
2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate
1 next) at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token) Code: -32602 -
Tried to reproduce it on Windows 10 with same versions and it works there
Expected behavior
- There should work intellisense in .cshtml file
Actual behavior
- Intellisense works only in .cs files
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (13 by maintainers)
Top GitHub Comments
Looks like a duplicate of https://github.com/OmniSharp/omnisharp-vscode/issues/3485
Awesome! I’ll close for now and @ph4nt0mgh0sT17 feel free to re-open if we’re wrong 😄