Tried the steps mentioned here, did not resolve the error. Had to do change the omnisharp.useGlobalMono option to always. This worked for C# extension for VS Code=1.23.2.
Source: Reddit Post
Your error output tells me that you’re using the official C# extension
for VS Code. The latest version of said extension, 1.23.2, has this to
say in its changelog:For Mono-based development (e.g. Unity) that requires full .NET framework, you need to set "omnisharp.useGlobalMono": "always". Thisis needed until Mono upgrades their bundled MSBuild version
The default setting, auto, does not work. Switch it to always and
restart the extension. Alternatively you could downgrade to 1.23.1.