2017-02-25 2 views
1

Ich habe die Lösung mit monodevelop auf Windows gebaut, dann übertrug die Dateien mit Filezilla auf meine vps. Es funktioniert gut auf Windows. Aber wenn ich versuche, steambot mit Mono steambot.exe zu laufen bekomme ich die Fehler:Fehler bei der Ausführung von steambot auf vps debian System.MissingMethodException: Methode nicht gefunden: 'System.Array.Empty'

Unhandled Exception: System.MissingMethodException: Method not found: 'System.Array.Empty'. 
    at SteamBot.Program.BotManagerMode() [0x00000] in <filename unknown>:0 
    at SteamBot.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not found: 'System.Array.Empty'. 
    at SteamBot.Program.BotManagerMode() [0x00000] in <filename unknown>:0 
    at SteamBot.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[email protected]:~/steambot/SteamBot-master/Bin/Release$ mono SteamBot.exe 
Missing method System.Array::Empty<[1]>() in assembly /usr/lib/mono/4.0/mscorlib.dll, referenced in assembly /home/mattimat/steambot/SteamBot-master/Bin/Release/SteamBot.exe 

Unhandled Exception: System.MissingMethodException: Method not found: 'System.Array.Empty'. 
    at SteamBot.Program.BotManagerMode() [0x00000] in <filename unknown>:0 
    at SteamBot.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not found: 'System.Array.Empty'. 
    at SteamBot.Program.BotManagerMode() [0x00000] in <filename unknown>:0 
    at SteamBot.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[email protected]:~/steambot/SteamBot-master/Bin/Release$ 

Mono-Version:

Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-8+deb7u1) 
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com 
     TLS:   __thread 
     SIGSEGV:  altstack 
     Notifications: epoll 
     Architecture: x86 
     Disabled:  none 
     Misc:   softdebug 
     LLVM:   supported, not enabled. 
     GC:   Included Boehm (with typed GC and Parallel Mark) 

Wieder funktioniert auf Windows. VPS ist Debian 7.11 x32

Antwort

1

public static T[] System.Array.Empty<T>() wurde in .Net 4.6 hinzugefügt und somit würde Ihre ältere Version von Mono laufen .Net 4.5 und der Fehler wäre zu erwarten.

Aktualisieren Sie entweder Ihre Version von Mono auf 4.8 oder entfernen Sie die Verwendung von Array.Empty und kompilieren Sie mit dem .Net 4.5-Framework.

re: https://msdn.microsoft.com/en-us/library/dn906179(v=vs.110).aspx

+0

Danke sooo viel !! Das hat mich verrückt gemacht. Die Aktualisierung von Mono auf 4.8+ behebt dieses Problem für mich. – Mattimat

Verwandte Themen