VSCode Unity OmniSharp .NETFramework not found

  • Close VS Code.

  • Download and install Microsoft .NET Framework 4.7.1.

  • Download and install Microsoft's .NET Framework SDK any version with start 4.X

  • In VS Code, open Assembly_CSharp.csproj file and change TargetFrameworkVersion to what you installed .NET Framework SDK version.

You should have both .NET framework and targeting sdk installed for a particular version.

This is a temporary solution because targetFrameworkVersion always changes to unity defaults when you close the editor


Install latest stable Mono Version should fix the issue for this one, if anyone faces a similar issue.

Or try a different one until it is resolved, might be some mono versions preventing this.