2017-02-25 4 views
1

Windowsでmonodevelopを使用してソリューションを構築し、Filezillaを使用してvpsにファイルを転送しました。それは窓でうまく動作します。しかし、私はモノラルsteambot.exeを使用してsteambotを実行しようとすると、私はエラーを取得:vps debianでsteambotを実行しようとするとエラーが発生するSystem.MissingMethodException:メソッドが見つかりません: '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 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) 

を繰り返しますが、Windows上で正常に動作します。 VPSはDebian 7.11 x32

答えて

1

public static T[] System.Array.Empty<T>().Net 4.6に追加されています。古いバージョンのMonoは.Net 4.5を実行していて、エラーが発生するはずです。

Monoを4.8+に更新するか、Array.Emptyの使用を削除し、.Net 4.5フレームワークに対してコンパイルしてください。

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

+0

すっごくありがとうございました!!これは私にナッツを運転していた。モノを4.8にアップデートすると、この問題が修正されました。 – Mattimat

関連する問題