dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.84k stars 666 forks source link

OmniSharp server not starting, so no intellisense #4020

Open MorganJay opened 4 years ago

MorganJay commented 4 years ago

Issue Description

I started using VSCode for C# in March. I installed all the needed extensions and everything was working fine. Just the way it did on Visual Studio. But VScode started acting up, I had to switch back to Visual Studio then that started acting up as well so I came back. I have reinstalled VScode and ext. twice but to no avail. I noticed the flame icon doesn't show up, intellisense, no go to definitions and all the various features of OmniSharp while I started developing .NET mvc pages using aspdotnetcorerazor.

I have seen other similar issues on this site but they don't work for me. I have increased the project load timeout progressively but no luck. it's at 1000 secs now. It takes too long to load and still times out. so no flame icon

Steps to Reproduce

Open any C# file. Try typing "Console then add a dot" see if intellisense and predictions show up OR open a .cshtml file

Expected Behavior

Find References/Peek definition CodeLens Search for Symbols IntelliSense Editing Evolved

Actual Behavior

Nothing listed above. I manually type everything

Logs

OmniSharp log

Starting OmniSharp server at 27/08/2020, 12:06:12 Target: c:\Users\MORGAN JAMES\Documents\START.NG\C# Razor dev mode active. Suppressing built-in OmniSharp Razor support. OmniSharp server started. Path: c:\Users\MORGAN JAMES\.vscode\extensions\ms-dotnettools.csharp-1.23.1\.omnisharp\1.37.0\OmniSharp.exe PID: 4408 [ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

Environment information

VSCode version: 1.48.2 C# Extension: 1.23.1

Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.1.401 Commit: 39d17847db Runtime Environment: OS Name: Windows OS Version: 10.0.18362 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\3.1.401\ Host (useful for support): Version: 3.1.7 Commit: fcfdef8d6b .NET Core SDKs installed: 3.1.101 [C:\Program Files\dotnet\sdk] 3.1.201 [C:\Program Files\dotnet\sdk] 3.1.401 [C:\Program Files\dotnet\sdk] .NET Core runtimes installed: Microsoft.AspNetCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |asp-net-core-switcher|adrianwilczynski|2.0.2| |asp-net-core-vs-code-extension-pack|temilaj|1.0.3| |aspnet-helper|schneiderpat|0.6.4| |auto-rename-tag|formulahendry|0.1.4| |beautify|HookyQR|1.5.0| |bracket-pair-colorizer|CoenraadS|1.0.61| |code-runner|formulahendry|0.11.0| |color-highlight|naumovs|2.3.0| |csharp|ms-dotnettools|1.23.1| |Csharp-ASPNETCore|rahulsahay|1.11.0| |csharpextensions|jchannon|1.3.1| |csharpfixformat|Leopotam|0.0.84| |debugger-for-chrome|msjsdiag|4.12.10| |docomment|k--kato|0.1.18| |gitlens|eamodio|10.2.2| |html-css-class-completion|Zignd|1.19.0| |javascript-essentials|Gydunhn|0.0.5| |JavaScriptSnippets|xabikos|1.8.0| |jshint|dbaeumer|0.10.21| |LiveServer|ritwickdey|5.6.1| |msbuild-project-tools|tintoy|0.3.8| |mssql|ms-mssql|1.9.0| |netcore-snippets|doggy8088|3.10.0| |npm-intellisense|christian-kohler|1.3.0| |path-intellisense|christian-kohler|2.2.1| |prettier-vscode|esbenp|5.3.0| |quokka-vscode|WallabyJs|1.0.315| |vs-keybindings|ms-vscode|0.2.0| |vscode-docker|ms-azuretools|1.5.0| |vscode-eslint|dbaeumer|2.1.8| |vscode-firefox-debug|firefox-devtools|2.9.1| |vscode-icons|vscode-icons-team|10.2.0| |vscodeintellicode|VisualStudioExptTeam|1.2.10|;
jmarolf commented 4 years ago

@MorganJay it appears that omnisharp is failing to load your project within the given project load timout (default is one minute). Can you try setting omnisharp.projectLoadTimeout to 300 (meaning 300 seconds)? Would also appreciate any project you can point us at that reproduces this issue reliably. It could be some project failing to load but I would expect that to show up in the log (setting omnisharp.LogLevel to trace can also reveal more info here). Thanks!

MorganJay commented 3 years ago

@jmarolf I've even attempted up to 10,000 seconds and it didn't still load my project. This is the first time I'm encountering this issue tho.

Omnisharp hasn't been working for a while I just deduced the causes recently.

But thanks for you input. I'll be sure to try it out, maybe it would wake up now! 😃

jmarolf commented 3 years ago

Omnisharp hasn't been working for a while I just deduced the causes recently.

If the issue is still happening I would prefer to keep this open.