vscode-csharp
vscode-csharp copied to clipboard
no "OmniSharp: Select Project" showing when ctrl + shift + P pressed, C# intellisense not working, Explorer no folder opened
Type: Performance Issue
Issue Description
Steps to Reproduce
Expected Behavior
Actual Behavior
Logs
OmniSharp log
C# log
Environment information
VSCode version: 1.85.1 C# Extension: 2.15.30 Using OmniSharp: true
Dotnet Information
.NET SDK: Version: 8.0.100 Commit: 57efcf1350 Workload version: 8.0.100-manifests.6c33ef20Runtime Environment: OS Name: Windows OS Version: 10.0.22621 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.100\
.NET workloads installed: Workload version: 8.0.100-manifests.6c33ef20 There are no installed workloads to display.
Host: Version: 8.0.0 Architecture: x64 Commit: 5535e31a71
.NET SDKs installed: 7.0.401 [C:\Program Files\dotnet\sdk] 8.0.100 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found: 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 | Folder Name |
|---|---|---|---|
| c-cpp-runner | franneck94 | 9.4.3 | franneck94.c-cpp-runner-9.4.3 |
| cmake | twxs | 0.0.17 | twxs.cmake-0.0.17 |
| cmake-tools | ms-vscode | 1.16.32 | ms-vscode.cmake-tools-1.16.32 |
| cpptools | ms-vscode | 1.19.1 | ms-vscode.cpptools-1.19.1-win32-x64 |
| cpptools-extension-pack | ms-vscode | 1.3.0 | ms-vscode.cpptools-extension-pack-1.3.0 |
| cpptools-themes | ms-vscode | 2.0.0 | ms-vscode.cpptools-themes-2.0.0 |
| csdevkit | ms-dotnettools | 1.2.7 | ms-dotnettools.csdevkit-1.2.7-win32-x64 |
| csharp | ms-dotnettools | 2.15.30 | ms-dotnettools.csharp-2.15.30-win32-x64 |
| csharpextensions | jchannon | 1.3.1 | jchannon.csharpextensions-1.3.1 |
| csharpextensions | kreativ-software | 1.7.3 | kreativ-software.csharpextensions-1.7.3 |
| vscode-dotnet-runtime | ms-dotnettools | 2.0.0 | ms-dotnettools.vscode-dotnet-runtime-2.0.0 |
| vscode-lldb | vadimcn | 1.10.0 | vadimcn.vscode-lldb-1.10.0 |
| vscodeintellicode-csharp | ms-dotnettools | 0.1.26 | ms-dotnettools.vscodeintellicode-csharp-0.1.26-win32-x64 |
Extension version: 2.15.30 VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:49:37.021Z) OS version: Windows_NT x64 10.0.22621 Modes:
System Info
| Item | Value |
|---|---|
| CPUs | 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (8 x 2419) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
| Load (avg) | undefined |
| Memory (System) | 7.72GB (1.75GB free) |
| Process Argv | C:\UnityWorkspace\Trash Flight\Assets\Scripts\Player.cs |
| Screen Reader | no |
| VM | 0% |
Process Info
CPU % Mem MB PID Process
0 103 2644 code main
0 96 2836 window [2] (Issue Reporter)
0 38 12032 utility-network-service
0 152 14660 gpu-process
0 86 18388 fileWatcher [1]
0 193 19844 window [1] (Player.cs - Visual Studio Code)
0 93 21292 ptyHost
0 152 22892 extensionHost [1]
0 280 7768 c:\Users\usele\.vscode\extensions\ms-dotnettools.csharp-2.15.30-win32-x64\.roslyn\Microsoft.CodeAnalysis.LanguageServer.exe --logLevel Information --starredCompletionComponentPath c:\Users\usele\.vscode\extensions\ms-dotnettools.vscodeintellicode-csharp-0.1.26-win32-x64\components\starred-suggestions\node_modules\@vsintellicode\starred-suggestions-csharp --extension c:\Users\usele\.vscode\extensions\ms-dotnettools.csharp-2.15.30-win32-x64\.roslynDevKit\Microsoft.VisualStudio.LanguageServices.DevKit.dll --sessionId 0edc90ae-d9d5-4882-88e6-81cde4c73c071705086218921 --telemetryLevel off --extensionLogDirectory c:\Users\usele\AppData\Roaming\Code\logs\20240112T213944\window1\exthost\ms-dotnettools.csharp
0 227 18892 electron-nodejs ("C:\Users\usele\AppData\Local\Programs\Microsoft VS Code\Code.exe" --ms-enable-electron-run-as-node --dns-result-order=ipv4first c:\Users\usele\.vscode\extensions\ms-dotnettools.vscodeintellicode-csharp-0.1.26-win32-x64\dist\node_modules\@vsintellicode\completions-csharp\workerEntry.js)
0 86 24424 shared-process
Workspace Info
;
basically same issue with this: https://github.com/dotnet/vscode-csharp/issues/3640/#issue-577447944 but there's no solution found. I just started getting interested in this coding thing. Please help me.
Looks like the extension is using the Roslyn LSP and VSCode was opened against a Unity script file. Looking at the installed extensions and it might help to install the Unity VSCode extension. See https://devblogs.microsoft.com/visualstudio/announcing-the-unity-extension-for-visual-studio-code/ for more details.
I downloaded the Unity extension but it still doesn't work. Thank you for the help though.
This is how my code looks
vs
how it should look like
This is the external tools settings in Unity if needed.
The C# extension requires opening a folder containing either a .csproj or .sln file. It looks like Unity it opening the .cs file on its own.
I am not an expert on the Unity configuration but just wanted to be sure that you followed the steps outlined in https://code.visualstudio.com/docs/other/unity#_install. You have Unity 2021 or higher and the version of the 'Visual Studio Editor' Unity Package is 2.0.20 or higher.
Since this is a Unity issue, I believe the correct repo for this issue is https://github.com/microsoft/vscode-dotnettools/issues.