Reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found

I had the same issue but on OSX. Installing latest version of Mono cleared up the missing .net v4.7.1 framework references.

I installed Mono V5.18.0 from https://www.mono-project.com/download/stable

Update: See comment below regarding global omnisharp setting


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". This

is 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.