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

Roslyn Analyzer works even though I disabled It #5998

Closed
Tracked by #5951
MuhammadKotb opened this issue Aug 2, 2023 · 9 comments · Fixed by #6058
Closed
Tracked by #5951

Roslyn Analyzer works even though I disabled It #5998

MuhammadKotb opened this issue Aug 2, 2023 · 9 comments · Fixed by #6058
Assignees
Milestone

Comments

@MuhammadKotb
Copy link

I don't like analyzing my code while Editing So I Disabled the Roslyn Analyzer through Enable support for roslyn analyzers, code fixes and rulesets setting

But It still works even after restarting language server and restarting vscode

I switched to version v1.26.0 and Everything is working fine

@dibarbet dibarbet added this to the Next milestone Aug 2, 2023
@dibarbet
Copy link
Member

dibarbet commented Aug 2, 2023

This is a side effect of switching to the new roslyn based language server as a default in the latest version of the extension. For now as workaround you can either downgrade or set the dotnet.server.useOmnisharp flag to get back the old behavior.

This is an option we should consider in the new roslyn based language server as well
cc @mavasani

@MuhammadKotb
Copy link
Author

I upgraded to the latest version and set dotnet.server.useOmnisharp to true and restarted vscode but unfortunately the behavior did not change

@dibarbet
Copy link
Member

dibarbet commented Aug 2, 2023

Hmm that's definitely unexpected. Mind sharing your C# / Omnisharp logs from the output window when you have the 'dotnet.server.useOmnisharp' setting checked?

@MuhammadKotb
Copy link
Author

MuhammadKotb commented Aug 2, 2023

from c# output Dotnet path: /home/kotb/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.9/dotnet Activating C# + C# Dev Kit + C# IntelliCode... info: LanguageServerHost[0] Starting server...

from c# dev kit output Starting Spawn .NET server... Starting Open a solution... Starting Open a solution with environment service... Starting Clear environment... .NET server started and IPC established in 2282ms Completed Spawn .NET server (2312ms) Completed Clear environment (3454ms) Completed Open a solution with environment service (3543ms) Starting Restore solution... Completed Open a solution (3776ms) Completed Restore solution (4715ms)

these are the available outputs
image

@dibarbet
Copy link
Member

dibarbet commented Aug 3, 2023

Ah gotcha, thanks for the additional info. When the devkit extension is installed, the dotnet.server.useOmnisharp option is ignored - this is because devkit requires that the C# extension is launched with the new Roslyn LSP based server.

In order to use the dotnet.server.useOmnisharp flag, C# devkit needs to be uninstalled or disabled.

@MuhammadKotb
Copy link
Author

Is there any chance to fix it ?

@tommyvct
Copy link

tommyvct commented Aug 3, 2023

Mine have the same behaviour, but from the C# output log it will stuck at Starting server... indefinitely.

@tommyvct
Copy link

tommyvct commented Aug 3, 2023

I want to use the IntelliCode extension but it depends on the C# Dev Kit, which will enforce the use of Roslyn. But it's so broken that the language server can't even be started, which renders the whole C# thing unusable.

I'm on openSUSE Tumbleweed with .NET 7.

UPDATE: I somehow fixed it by disable and reenable the dev kit extension a few times.

@vladkor-alt
Copy link

Hmm that's definitely unexpected. Mind sharing your C# / Omnisharp logs from the output window when you have the 'dotnet.server.useOmnisharp' setting checked?

Really? Unexpected? Considering latest few releases this kind of stuff becomes rather greatly expected. "Oh, look, they released a new version of C# extension! LET'S SEE WHAT DID THEY FUCK UP THIS TIME, SHALL WE?"

mavasani added a commit to mavasani/vscode-csharp that referenced this issue Aug 4, 2023
Related to dotnet#5998
This ensures that the Background analysis scope option becomes the source of truth for both C# extension and OmniSharp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants