TypeLoadException in vscode

I’m running Unity 2020 with VSCode on Ubuntu 20.04. I had vscode working properly with all the intellisense and everything but now I get this error from the C# vscode extension when I open my .sln file. Can anybody help point me in a direction towards fixing this?

System.TypeLoadException: Could not find method '.ctor' due to a type load error: Could not set up parent class, due to: Could not set up parent class, due to: assembly:/home/timmeh/work/unity/installs/2020.1.10f1/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll type:Object member:(null) assembly:/home/timmeh/work/unity/installs/2020.1.10f1/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll type:Attribute member:(null) assembly:/home/timmeh/work/unity/3_Project_Boost/Library/ScriptAssemblies/UnityEngine.TestRunner.dll type:TestRunCallbackAttribute member:(null)

Here’s the full OmniSharp output if that helps: https://pastebin.com/vJhh8pmE

Update: in Unity’s external editor preferences I enabled the options to generate .csproj files for:

  • Registry Packages
  • Built-in Packages

Now, OmniSharp loads without errors and everything is working again.

I’m an experienced dev but new to C#. Can somebody give me some hints about what happened here and why this was necessary? I hate “fixing” things without understand the why & how.

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

Privacy & Terms