Home > Enterprise >  Syntax Highlighting isn't working correctly for c# 10.0 in vscode
Syntax Highlighting isn't working correctly for c# 10.0 in vscode

Time:12-10

Starting from c# 10.0 came a new way of a namespace declaration, aka Sample picture with working highlightning for file level namespaces.

Make sure that both versions are up to date. It should auto update extensions and suggest updates for VSCode itself as default but it seems like it isn't updating properly for everyone (or at least not fast enough).

CodePudding user response:

I had the same issue recently. I think that OmniSharp is not up to date yet. To fix the issue, add these settings to the Settings JSON:

"editor.semanticHighlighting.enabled": true,
"csharp.semanticHighlighting.enabled": true,

That worked for me.

  • Related