Starting from c# 10.0 came a new way of a namespace declaration, aka
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.