VSCode omnisharp not loading

I am suddenly failing to get VS Code on Ubuntu to have omnisharp to initialize. I am getting the following error:

[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).

I’ve tried a trivial project, I’ve tried rebooting, I’ve tried uninstalling and reinstalling mono and code.

When I uncheck the “Omnisharp: Use Modern Net” in my instance of code, the Omniserver won’t start because the path is wrong. What path would I even use?

I’ve almost guaranteed to have made my situation worse.
I can’t tell if this error is really telling me something about the .NET framework or something about how the assembly is being generated by Unity.

Can anyone point to a reference or checkout procedure to help isolate my problem?

Same problem on Windows, but it can be solved by installing “Build Tools for Visual Studio 2022”.

I don’t know what would be the equivalent on Ubuntu.

You can also make it work again if you roll back to the previous version of the C# extension (1.24.4).

To install the old version click on the C# extension cogwheel in VSCode and click Install Another Version.

The C# extension had an update, and on the update page they say for unity projects in vscode you need to add "omnisharp.useModernNet": false, to your settings.json file. Doing that fixed this issue for me.

Same problem here. Yesterday it work and now on some project doesn’t.

you can check this: C# not working, Omnisharp not starting · Issue #3640 · dotnet/vscode-csharp · GitHub