首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >尝试在vps上运行steambot时出错debian System.MissingMethodException:方法未找到:'System.Array.Empty‘

尝试在vps上运行steambot时出错debian System.MissingMethodException:方法未找到:'System.Array.Empty‘
EN

Stack Overflow用户
提问于 2017-02-25 17:14:46
回答 1查看 366关注 0票数 1

我已经建立了解决方案使用单开发窗口,然后转移到我的文件到我的vps使用Filezilla。它在窗户上很好用。但是,当我尝试使用mono steambot.exe运行steambot时,我会得到以下错误:

代码语言:javascript
复制
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$

单一版本:

代码语言:javascript
复制
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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42459097

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档