dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.85k stars 669 forks source link

Omnisharp not working after starting the process #5594

Open Karuption opened 1 year ago

Karuption commented 1 year ago

Issue Description

Omnisharp not starting after spawning the Omnisharp.dll proccess

Steps to Reproduce

Start or restart the omnisharp server

Expected Behavior

Omnisharp runs and is able to compile and give intellisense

Actual Behavior

Omnisharp server not starting, but the spawned process is running.

Logs

OmniSharp log

OmniSharp server started with .NET 7.0.200 . Path: c:\Users\Anonymous.vscode\extensions\ms-dotnettools.csharp-1.25.4-win32-x64.omnisharp\1.39.4-net6.0\OmniSharp.dll PID: 25468

[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

C# log

Log is empty

Environment information

VSCode version: 1.75.1 C# Extension: 1.25.4

Dotnet Information .NET SDK: Version: 7.0.200 Commit: 534117727b Runtime Environment: OS Name: Windows OS Version: 10.0.22623 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.200\ Host: Version: 7.0.3 Architecture: x64 Commit: 0a2bda10e8 .NET SDKs installed: 6.0.402 [C:\Program Files\dotnet\sdk] 6.0.406 [C:\Program Files\dotnet\sdk] 7.0.103 [C:\Program Files\dotnet\sdk] 7.0.200 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Other architectures found: arm64 [C:\Program Files\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\arm64\InstallLocation] x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation] Environment variables: Not set global.json file: Not found Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |auto-rename-tag|formulahendry|0.1.10| |clang-format|xaver|1.9.0| |copilot|GitHub|1.74.8955| |cpptools|ms-vscode|1.14.3| |cpptools-extension-pack|ms-vscode|1.3.0| |cpptools-themes|ms-vscode|2.0.0| |csharp|ms-dotnettools|1.25.4| |es7-react-js-snippets|dsznajder|4.4.3| |gitlens|eamodio|13.3.0| |isort|ms-python|2022.8.0| |jupyter|ms-toolsai|2023.1.2010391206| |jupyter-keymap|ms-toolsai|1.0.0| |jupyter-renderers|ms-toolsai|1.0.14| |platformio-ide|platformio|3.0.0| |python|ms-python|2023.2.0| |remote-containers|ms-vscode-remote|0.275.1| |rust-analyzer|rust-lang|0.3.1410| |vscode-docker|ms-azuretools|1.23.3| |vscode-eslint|dbaeumer|2.4.0| |vscode-jupyter-cell-tags|ms-toolsai|0.1.6| |vscode-jupyter-slideshow|ms-toolsai|0.1.5| |vscode-pylance|ms-python|2023.2.40| |vscode-serial-monitor|ms-vscode|0.8.0|;
generateui commented 1 year ago

Can you try to make it work on a dotnet cleaned repo where you verify that all /bin and /obj folders (also for subrepos aka submodules) are empty/removed? I have the same symptoms, but after

  1. dotnet clean
  2. verify /bin and /obj are empty/removed
  3. kill all dotnet processes
  4. kill all vscode instances
  5. start vscode with repo

Omnisharp server does startup. However, the experience is mostly broken since there are no debug binaries (obj) which Omnisharp can work with so intellisense is limited.

Karuption commented 1 year ago

Did the above with no change. I have also tried to uninstall every extension, uninstall VSC, delete the VSC temp files, uninstall .NET core. Reboot. Then installed them again with no change.

I can run the project via the CLI with no issues.

gianlucapili93 commented 1 year ago

Same problem