运行NancyFx时单声道未处理的异常

Cri*_*lin 6 c# mono nancy ubuntu-12.04

我正在运行Ubuntu 12.04,我安装了单一运行时包.在我的Windows机器上,我的NancyFx自托管应用程序编译好1警告,但当我尝试在我的VPS上运行它时,我收到以下错误:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or
assembly 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' or one
of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load
file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
Run Code Online (Sandbox Code Playgroud)

关于如何解决这个问题的任何想法?

Mar*_*ter 19

我试图在Ubuntu 14.04 Docker虚拟机上运行Mono应用程序(在我的Windows机器上的Xamarin Studio中编译)时遇到了同样的问题.我做了与你相同的事情并安装了mono-runtime,经过一两个小时的搜索后,能够在安装后让它工作mono-complete.然而,这也减少了几百MB的额外的东西.最后我发现,做的伎俩包:libmono-system-core4.0-cil(见这里).

希望有所帮助!


Ale*_*ger 0

Ubuntu 12.04 存储库中提供的 Mono 版本非常旧。尝试使用较新的 Mono(例如 Ubuntu 14.04 中的 Mono),看看是否有效。