Unity 3D C# errors in VSC

Hey there.
I've recently installed unity hub alongside the editor.
When trying to edit a script, I get this error from the official C# extension:

[fail]: OmniSharp.MSBuild.ProjectLoader
        This project targets .NET version that requires reference assemblies that are not installed (e.g. .NET Framework). The most common solution is to make sure Mono is fully updated on your machine (https://mono-project.com/download/) and that you are running the .NET Framework build of OmniSharp (e.g. 'omnisharp.useModernNet': false in C# Extension for VS Code).
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/home/mooninorbit/My project/Mirror.CompilerSymbols.csproj'.
/home/mooninorbit/My project/Mirror.CompilerSymbols.csproj
/usr/share/dotnet/sdk/6.0.106/Microsoft.Common.CurrentVersion.targets(1217,5): Error: This project targets .NET version that requires reference assemblies that are not installed (e.g. .NET Framework). The most common solution is to make sure Mono is fully updated on your machine (https://mono-project.com/download/) and that you are running the .NET Framework build of OmniSharp (e.g. 'omnisharp.useModernNet': false in C# Extension for VS Code).

When making a console app, everything works normally and the extension doesn't complain.
What can be the cause?
I have the latest dotnet version installed, is that maybe causing the issue?

I've fixed this issue by going to the OmniSharp's extension settings and unticking the "UseModernNet" setting.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.