Unity + VS Code: omnisharp extension doesn't work in Manjaro!

While using Unity3D and VS Code in Manjaro, VS Code extensio omnisharp (for code completion and semantic cheking) can’t load the assemblies because it’s missing some .NET Framework stuff. Error message says Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. Here’s the complete line:

/home/dandrea/.vscode/extensions/ms-dotnettools.csharp-1.23.8/.omnisharp/1.37.5/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1180,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

I got the packages dotnet-host, dotnet-runtime, dotnet-sdk, and dotnet-targeting-pack (version 3.1.8.sdk108-1) installed, and it still didn’t do. I then installed mono-msbuild and mono-msbuild-sdkresolver as said in a post of other forum, but it didn’t fix it as well.

How to solve this?

I got the solution. It seems I was missing a simple step I found here:

  • Open VS Code, File, Preferences, Settings, search for “mono” and change option “Omnisharp: Use Global Mono” to “always”.

I already had the dotnet-sdk and mono installed, but that little setting was the missing charm.

1 Like

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