2017-02-25 2 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) 

가 다시 창에 잘 작동합니다. VPS는 Debian 7.11 x32

답변

1

public static T[] System.Array.Empty<T>().Net 4.6에 추가되어 이전 버전의 .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

관련 문제