1

Maybe it's from the recent VS Code update, It suddenly pops up..

it's highlighting some of my non-error codes in a blue line and sometimes it translucent some of my variables that doesn't have an error or what.

It's kinda bothering me now the way it looks, I tried searching in google youtube, but I'm at lost, mostly it's for visual studio.

3 Answers3

2

We had a bug in the 2.0 line of the VS Code extensions where it's showing a lot of blue squiggles when we didn't expect it. This is fixed in 2.0.346 or later.

Jason Malinowski
  • 18,148
  • 1
  • 38
  • 55
  • 1
    link to issue ticket(s) please? – starball Aug 09 '23 at 03:54
  • It appears we never filed a bug -- we just fixed it in 2.0.346. That's a prerelease build that has a different bug around go to definition so we didn't promote it to stable yet but any build 2.0.346 or later should be good. – Jason Malinowski Aug 10 '23 at 19:28
1

Try using the omnisharp.enableRoslynAnalyzers setting. Or if you want to switch back to using OmniSharp for IntelliSense, set dotnet.server.useOmnisharp to true.


If you want to disable warning/hint diagnostics, you might be able to do it with an editorconfig like this if you have editorconfig support enabled (source):

[*.{cs,vb}]
dotnet_analyzer_diagnostic.category-Style.severity = none
dotnet_analyzer_diagnostic.category-CodeQuality.severity = none

Or alternatively, if you want to just hide the squiggly underlines, see https://stackoverflow.com/a/74934214/11107541.

starball
  • 20,030
  • 7
  • 43
  • 238
  • Note: due to timing of this question makes me think this is the bug we shipped, and since that's the non-Omnisharp side changing the omnisharp.enableRoslynAnalzyers flag won't do anything. – Jason Malinowski Aug 07 '23 at 17:41
0

Following the link from the first comment, you'd need to:

  1. Disable Roslyn.
  2. Re-Enable Omnisharp as the language server.
  3. Disable/remove another extension.

Roslyn

In settings- search for and disable Enable Roslyn analysers.

OmniSharp

  1. In settings- Search dotnet.server.Use Omnisharp
  2. Enable this setting.
  3. Remove (or disable) extension: C# Dev Kit
  4. Restart!

Note: It seems like some smarty pants decided it would be wise to remove omnisharp, so doing this will prompt it to be re-downloaded.

LCWilliams
  • 148
  • 3
  • 8