dotnet / vscode-csharp

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

C# extension 1.23.13 is not working (intellisense only) #4788

Open denis-dbm-inactive opened 2 years ago

denis-dbm-inactive commented 2 years ago

Issue Description

In my environment, C# ext intellisense is not working. Features like "import namespace" or "Code Lens" is working. There are logs pointing to a possible request failure

Received response for /v2/getcodeactions but could not find request. Received response for /quickinfo but could not find request.

If I downgrade it to 1.23.12, it works as expected.

I do not know why, but the auto-generated log is pointing as using mono runtime. I am not using that (force flag Use Global Mono = never).

Steps to Reproduce

  1. Create a new .NET 5 project
  2. Load that project
  3. Try use the intellisense

Expected Behavior

Intellisense works well with small or no delays.

Actual Behavior

It does not work and print a kind of failure log.

Logs

Received response for /v2/getcodeactions but could not find request. Received response for /quickinfo but could not find request.

OmniSharp log

Starting OmniSharp server at 9/27/2021, 12:04:36 AM Target: /home/dbm/Desktop/PingPong/PingPong.sln OmniSharp server started. Path: /home/dbm/.vscode/extensions/ms-dotnettools.csharp-1.23.13/.omnisharp/1.37.12/run PID: 5270 [info]: OmniSharp.Stdio.Host Starting OmniSharp on opensuse-tumbleweed 20210615.0 (x64) [info]: OmniSharp.Services.DotNetCliService DotNetPath set to dotnet [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator Located 1 MSBuild instance(s) 1: StandAlone 17.0.0 - "/home/dbm/.vscode/extensions/ms-dotnettools.csharp-1.23.13/.omnisharp/1.37.12/omnisharp/.msbuild/Current/Bin" [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator MSBUILD_EXE_PATH environment variable set to '/home/dbm/.vscode/extensions/ms-dotnettools.csharp-1.23.13/.omnisharp/1.37.12/omnisharp/.msbuild/Current/Bin/MSBuild.exe' [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator Registered MSBuild instance: StandAlone 17.0.0 - "/home/dbm/.vscode/extensions/ms-dotnettools.csharp-1.23.13/.omnisharp/1.37.12/omnisharp/.msbuild/Current/Bin" CscToolExe = csc.exe MSBuildToolsPath = /home/dbm/.vscode/extensions/ms-dotnettools.csharp-1.23.13/.omnisharp/1.37.12/omnisharp/.msbuild/Current/Bin CscToolPath = /home/dbm/.vscode/extensions/ms-dotnettools.csharp-1.23.13/.omnisharp/1.37.12/omnisharp/.msbuild/Current/Bin/Roslyn BypassFrameworkInstallChecks = true MSBuildExtensionsPath = /home/dbm/.vscode/extensions/ms-dotnettools.csharp-1.23.13/.omnisharp/1.37.12/omnisharp/.msbuild [info]: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0 [info]: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0 [info]: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100 [info]: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110 [info]: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140 [info]: OmniSharp.Cake.CakeProjectSystem Detecting Cake files in '/home/dbm/Desktop/PingPong'. [info]: OmniSharp.Cake.CakeProjectSystem Could not find any Cake files [info]: OmniSharp.MSBuild.ProjectSystem Detecting projects in '/home/dbm/Desktop/PingPong/PingPong.sln'. [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/home/dbm/Desktop/PingPong/PingPong.csproj' [info]: OmniSharp.Script.ScriptProjectSystem Detecting CSX files in '/home/dbm/Desktop/PingPong'. [info]: OmniSharp.Script.ScriptProjectSystem Could not find any CSX files [info]: OmniSharp.WorkspaceInitializer Configuration finished. [info]: OmniSharp.Stdio.Host Omnisharp server running using Stdio at location '/home/dbm/Desktop/PingPong' on host 5068. [info]: OmniSharp.MSBuild.ProjectManager Loading project: /home/dbm/Desktop/PingPong/PingPong.csproj [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/home/dbm/Desktop/PingPong/PingPong.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Adding project '/home/dbm/Desktop/PingPong/PingPong.csproj' [info]: OmniSharp.MSBuild.ProjectManager Update project: PingPong Received response for /v2/getcodeactions but could not find request. Received response for /quickinfo but could not find request. Received response for /quickinfo but could not find request. Received response for /v2/getcodeactions but could not find request. [info]: OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.RunCodeActionService Applying code action: using System.Xml;

C# log

(empty)

Environment information

VSCode version: 1.57.1 C# Extension: 1.23.13

Mono Information OmniSharp using built-in mono
Dotnet Information .NET SDK (reflecting any global.json): Version: 5.0.401 Commit: 4bef5f3dbf Runtime Environment: OS Name: opensuse-tumbleweed OS Version: 20210615 OS Platform: Linux RID: linux-x64 Base Path: /home/dbm/dev/dotnet/sdk/5.0.401/ Host (useful for support): Version: 5.0.10 Commit: e1825b4928 .NET SDKs installed: 5.0.401 [/home/dbm/dev/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 5.0.10 [/home/dbm/dev/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 5.0.10 [/home/dbm/dev/dotnet/shared/Microsoft.NETCore.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |code-spell-checker|streetsidesoftware|1.10.2| |code-spell-checker-portuguese-brazilian|streetsidesoftware|2.0.2| |cpptools|ms-vscode|1.5.1| |csharp|ms-dotnettools|1.23.13| |go|golang|0.27.2| |java|redhat|0.82.0| |Kotlin|mathiasfrohlich|1.7.1| |markdowntable|TakumiI|0.7.0| |msbuild-project-tools|tintoy|0.3.15| |vscode-docker|ms-azuretools|1.17.0| |vscode-java-debug|vscjava|0.36.0| |vscode-java-dependency|vscjava|0.18.6| |vscode-java-pack|vscjava|0.18.5| |vscode-java-test|vscjava|0.30.1| |vscode-maven|vscjava|0.34.0| |vscode-spring-boot|Pivotal|1.28.0| |vscodeintellicode|VisualStudioExptTeam|1.2.14|;
electricalArt commented 2 years ago

I got the same problem, but in my case there is nothing related to mono (mono is not installed on my machine)

1w1f commented 2 years ago

i got this too ,my code is in wsl2 ,when I coding in windows's vscode client i got the same =>'Received response for /v2/getcodeactions but could not find request.'