Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Roslyn code fix providers not suggested as quick fix actions #7802

Open
achobanov opened this issue Nov 16, 2024 · 8 comments
Open

Custom Roslyn code fix providers not suggested as quick fix actions #7802

achobanov opened this issue Nov 16, 2024 · 8 comments

Comments

@achobanov
Copy link

Type: Bug

Issue Description

They work as expected in VS and they were working for a few days on VS Code, but now they are no longer suggested.

Steps to Reproduce

Not sure what's changed since they stopped working. I did convert to pre-release versions of c# and c# dev kit at some point in order to test something unrelated, but I restored to stable versions afterwards. I've made no changes do my fix providers since it was working (and it's currently working in VS as mentioned)

Expected Behavior

Code fix actions should be provided in the quick fix menu

Actual Behavior

They aren't

Logs

exthost.zip

Environment information

VSCode version: 1.93.1
C# Extension: 2.55.29
Using OmniSharp: false

Dotnet Information .NET SDK: Version: 8.0.403 Commit: c64aa40a71 Workload version: 8.0.400-manifests.e0880c5d MSBuild version: 17.11.9+a69bbaaf5

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.403\

.NET workloads installed:
Configured to use loose manifests when installing new manifests.
[android]
Installation Source: SDK 8.0.400, VS 17.11.35327.3
Manifest Version: 34.0.143/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.android\34.0.143\WorkloadManifest.json
Install Type: FileBased

[aspire]
Installation Source: SDK 8.0.400, VS 17.11.35327.3
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: FileBased

[ios]
Installation Source: SDK 8.0.400, VS 17.11.35327.3
Manifest Version: 18.0.8303/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios\18.0.8303\WorkloadManifest.json
Install Type: FileBased

[maccatalyst]
Installation Source: SDK 8.0.400, VS 17.11.35327.3
Manifest Version: 18.0.8303/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maccatalyst\18.0.8303\WorkloadManifest.json
Install Type: FileBased

[maui-windows]
Installation Source: SDK 8.0.400, VS 17.11.35327.3
Manifest Version: 8.0.82/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maui\8.0.82\WorkloadManifest.json
Install Type: FileBased

Host:
Version: 8.0.10
Architecture: x64
Commit: 81cabf2857

.NET SDKs installed:
6.0.419 [C:\Program Files\dotnet\sdk]
7.0.410 [C:\Program Files\dotnet\sdk]
8.0.201 [C:\Program Files\dotnet\sdk]
8.0.302 [C:\Program Files\dotnet\sdk]
8.0.403 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.10 [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.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.10 [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
auto-close-tag formulahendry 0.5.15 formulahendry.auto-close-tag-0.5.15
csdevkit ms-dotnettools 1.13.9 ms-dotnettools.csdevkit-1.13.9-win32-x64
csharp ms-dotnettools 2.55.29 ms-dotnettools.csharp-2.55.29-win32-x64
markdown-preview-github-styles bierner 2.1.0 bierner.markdown-preview-github-styles-2.1.0
razor-switcher LennartKleymann 1.0.0 lennartkleymann.razor-switcher-1.0.0
vscode-dotnet-runtime ms-dotnettools 2.2.3 ms-dotnettools.vscode-dotnet-runtime-2.2.3
vscode-github-actions github 0.27.0 github.vscode-github-actions-0.27.0
vscode-icons vscode-icons-team 12.9.0 vscode-icons-team.vscode-icons-12.9.0
vscode-todo-highlight wayou 1.0.5 wayou.vscode-todo-highlight-1.0.5
vscode-yaml redhat 1.15.0 redhat.vscode-yaml-1.15.0
vscodeintellicode-csharp ms-dotnettools 2.2.3 ms-dotnettools.vscodeintellicode-csharp-2.2.3-win32-x64

Extension version: 2.55.29
VS Code version: Cursor 0.42.5 (001668006cc714afd397f4ef0d52862f5a095530, 2024-11-14T00:33:36.512Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz (6 x 2808)
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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.92GB (13.01GB free)
Process Argv
Screen Reader no
VM 0%

Sorry to pepper you with issues, hope my logs help. If you need further information I'm happy to help.

@dennitorf
Copy link

Same issue, MacOS Sequoia 15.1, dot net 8.0.104.

@dibarbet
Copy link
Member

@achobanov @dennitorf would either of you mind trying 2.56.31 (prerelease)? There is a related fix in that version that might also fix code actions.

@achobanov
Copy link
Author

I'll check it out at the weekend.

@jsgraham
Copy link

I think I'm having the same issue. I installed the StyleCop analyzers, and while I could see the red squiggles for violations, there were no fixes suggested. Updating to the pre-release C# extension (2.57.28) brought the quick fixes back.

@dennitorf
Copy link

I have tried the pre-release version, and the issue is not fixed. I'll retry, and keep an eye on the behaviour. Thanks.

@dibarbet
Copy link
Member

I have tried the pre-release version, and the issue is not fixed. I'll retry, and keep an eye on the behaviour. Thanks.

Are you able to share the code fix providers that you're using (e.g. is it a public nuget)?

@achobanov
Copy link
Author

achobanov commented Nov 21, 2024

You can see mine here. I think this one was among those that didn't execute last time. I can double in a few days time.

@dibarbet
Copy link
Member

You can see mine here. I think this one was among those that didn't execute last time. I can double in a few days time.

Thanks - I checked it out and confirmed the action was missing in 2.55 (release), but is present in 2.57.28 (current prerelease).
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants