我已经建立了解决方案使用单开发窗口,然后转移到我的文件到我的vps使用Filezilla。它在窗户上很好用。但是,当我尝试使用mono steambot.exe运行steambot时,我会得到以下错误:
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
mattimat@mattimat-ubuntu:~/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
mattimat@mattimat-ubuntu:~/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是Debian7.11 x32
发布于 2017-02-25 18:01:13
public static T[] System.Array.Empty<T>()是在.Net 4.6中添加的,因此您的旧版本的Mono将运行.Net 4.5,并且预期会出现错误。
要么将Mono版本更新为4.8+,要么删除Array.Empty的使用,并根据.Net 4.5框架进行编译。
re:https://msdn.microsoft.com/en-us/library/dn906179(v=vs.110).aspx
https://stackoverflow.com/questions/42459097
复制相似问题