question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Razor intellisense doesn't work in Ubuntu 19.10

See original GitHub issue

Environment 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.ResolveCommandPipeline2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate1 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:closed
  • Created 4 years ago
  • Comments:19 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
JoeRobichcommented, Feb 7, 2020
0reactions
NTaylorMullencommented, Feb 11, 2020

Looks like a duplicate of #3485

Awesome! I’ll close for now and @ph4nt0mgh0sT17 feel free to re-open if we’re wrong 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

IntelliSense in Razor files (.cshtml) stopped working
When intellisense stops working in the razor file, there's a good chance that the issue ... After uninstalled Xamarin, the razor Intellisense working...
Read more >
Unity3D on Ubuntu 19.10 with vscode and C# extension
This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in...
Read more >
Intellisense in Razor files (.cshtml) is not working.
Intellisense in Razor files (.cshtml) is not working. ... The first time in a session I try to load a .cshtml file, I...
Read more >
ASP.NET Core Development in Linux - The Blinking Caret
NET Core Linux development is now possible. This blog post describes how you can fully develop an ASP.NET Core application in Linux and...
Read more >
VS 2022 Razor Editor Performance : r/dotnet - Reddit
The razor editor is a known problem with VS, and is bad in 2019 and 2022, on both Windows and VS for Mac....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found