OmniSharp / omnisharp-atom

Omnisharp support for the atom editor
https://atom.io/packages/omnisharp-atom
MIT License
318 stars 61 forks source link

System.MissingMethodException: Method 'AppContext.get_BaseDirectory' not found. #993

Open Qix- opened 7 years ago

Qix- commented 7 years ago

Trying to load a Unity project to edit, and when I try to start the server I get the following error message:

Starting OmniSharp server (pid:84057)
OmniSharp Location: mono /Users/junon/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/omnisharp-mono/OmniSharp.exe
Change the location that OmniSharp is loaded from by setting the OMNISHARP environment variable
OmniSharp Path: /src/osrose.unityrose
OmniSharp: --stdio --zero-based-indices -s /src/osrose.unityrose --hostPID 78182
System.MissingMethodException: Method 'AppContext.get_BaseDirectory' not found.
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) <0x1a7faf0 + 0x00040> in :0 
--- End of stack trace from previous location where exception was thrown ---
  at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize () <0x29425c0 + 0x0001b> in :0 
  at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build () <0x28f2a78 + 0x00103> in :0 
  at OmniSharp.Program+<>c__DisplayClass1_0.b__1 () <0x6e5c30 + 0x004ff> in :0 
  at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute (System.String[] args) <0x6e48f0 + 0x0083e> in :0 
  at OmniSharp.Program.Run (System.String[] args) <0x6e03c8 + 0x0054b> in :0 
  at OmniSharp.Program.Main (System.String[] args) <0x6df218 + 0x0006f> in :0
mickaelistria commented 7 years ago

Same here while trying to update to newer OmniSharp

$ mono /home/mistria/git/aCute/org.eclipse.acute.omnisharpServer/server/omnisharp-node-client-issue-377/omnisharp-mono/OmniSharp.exe
OmniSharp: 
System.MissingMethodException: Method 'AppContext.get_BaseDirectory' not found.
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) <0x41acb230 + 0x0003f> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize () <0x41b1c150 + 0x0001f> in <filename unknown>:0 
  at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build () <0x41b0c940 + 0x0012f> in <filename unknown>:0 
  at OmniSharp.Program+<>c__DisplayClass1_0.<Run>b__1 () <0x41af3430 + 0x0064d> in <filename unknown>:0 
  at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute (System.String[] args) <0x41af2330 + 0x009f1> in <filename unknown>:0 
  at OmniSharp.Program.Run (System.String[] args) <0x41acdb30 + 0x0076f> in <filename unknown>:0 
  at OmniSharp.Program.Main (System.String[] args) <0x41acbc90 + 0x0006f> in <filename unknown>:0 
mickaelistria commented 7 years ago

This is most likely caused because environment uses a too old version of mono compared to what OmniSharp requires. Ideally, OmniSharp should check the mono version and report a more meaningful error message.

Qix- commented 7 years ago

I don't see how that's possible since I installed mono just for this plugin.