dotnet / vscode-csharp

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

Request codeLens/resolve failed in git diff #7178

Closed COOLIRON2311 closed 1 month ago

COOLIRON2311 commented 2 months ago

Environment data

dotnet --info output:

``` ПАКЕТ SDK ДЛЯ .NET: Version: 8.0.202 Commit: 25674bb2f4 Workload version: 8.0.200-manifests.8cf8de6d Среда выполнения: OS Name: Windows OS Version: 10.0.22631 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.202\ Установленные рабочие нагрузки .NET: Нет установленных рабочих нагрузок для отображения. Host: Version: 8.0.3 Architecture: x64 Commit: 9f4b1f5d66 .NET SDKs installed: 8.0.202 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.28 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.30 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.3 [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 ```

VS Code version: 1.89.1

C# Extension version: v2.30.28

OmniSharp log

Steps to reproduce

  1. Make a change in any .cs file in git repo
  2. Open Source Control tab
  3. Click on changed file
  4. Diff view appears with a popup message Request codeLens/resolve failed.
  5. Go to output reveals the following:
[Error - 3:59:55 PM] Request codeLens/resolve failed.
  Message: Unsupported extension '.cs%22,%22ref%22:%22~%22%7D' and LSP language id ''
  Code: -32000 
[object Object]

Expected behavior

No popup message appears

Actual behavior

A popup message appears

Additional context

None

adrocic commented 2 months ago

Any updates on this? I am also having this issue.

bsal649 commented 2 months ago

Not sure if it's worth a separate issue, but also suppressing the notifications doesn't work.

dibarbet commented 2 months ago

Not allowing errors to be suppressed was an explicit design choice by VSCode itself. As a workaround until we can resolve this, you can check the dotnet.server.suppressLspErrorToasts option in vscode settings.

dibarbet commented 1 month ago

This was resolved in the 2.39.28 prerelease by https://github.com/dotnet/roslyn/pull/74300