- Home /
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?
Answer by Jonathan-Tremblay · May 27 at 10:12 PM
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.
Installing the older version did do the trick. This is less than ideal but I couldn't make the solution provided by Jacquesj work.
At least I can now edit and effectively use Intellisense.
Answer by a-vrabec · May 27 at 10:43 AM
Same problem here. Yesterday it work and now on some project doesn't.
Answer by JacquesJ · May 27 at 11:46 PM
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.
I changed that value, but then omnisharp server souldn't start and complained about a path to a file that didn't exist. Did you change a path in addition to changing useModernNet?
I see the settings.json file, but I'm not sure how to edit it other than through the VS Code UI.
Answer by Joe0321 · May 28 at 04:02 AM
you can chek this :https://github.com/OmniSharp/omnisharp-vscode/issues/3640/[Costco Employee Site][1]
[1]: https://www.costcoemployeesite.net/