无法运行带有Mono的.net应用-找不到mscorlib.dll(版本不匹配?) [英] Unable to run .net app with Mono - mscorlib.dll not found (version mismatch?)

查看:610
本文介绍了无法运行带有Mono的.net应用-找不到mscorlib.dll(版本不匹配?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用.net 3.5SP1在Windows下编写和编译的简单.net命令行工具.我想在Linux上使用Mono来运行它.

I have a simple .net command line tool written and compiled under Windows, using .net 3.5SP1. I would like to run it on Linux using Mono.

我正在使用Ubuntu 12.04,并使用Ubuntu软件中心安装了Mono Runtime.如果我尝试通过以下方式在终端中启动我的应用程序:

I am using Ubuntu 12.04, and installed Mono Runtime using the Ubuntu software center. If I try to start my app in the terminal by doing:

mono MyApp.exe

我得到了错误:

找不到或无法加载程序集mscorlib.dll.它应该已经安装在"usr/lib/mono/2.0/mscorlib.dll"中.

The assembly mscorlib.dll was not found or could not be loaded. It should have been installed in the 'usr/lib/mono/2.0/mscorlib.dll'.

如果我导航到该位置,则会发现它不存在.但是,有usr/lib/mono/4.0/mscorlib.dll(同一文件夹中还有更多DLL).

If I navigate to that location, I see that it does not exist. However, there is usr/lib/mono/4.0/mscorlib.dll (and some more DLLs in the same folder).

因此,似乎存在版本不匹配.

So seemingly there is a version mismatch.

[如果有关系,mono -V会显示Mono JIT compiler version 2.10.8.1 (Debia 2.10.8.1-1ubuntu2)]

[in case it matters, mono -V shows Mono JIT compiler version 2.10.8.1 (Debia 2.10.8.1-1ubuntu2) ]

推荐答案

我通过安装mono-complete使它起作用:

I got it to work by installing mono-complete:

sudo apt-get install mono-complete

在那之后,我在usr/lib/mono下有文件夹2.0、3.5、4.0和更多文件夹

After that, I had folders 2.0, 3.5, 4.0 and more under usr/lib/mono

这篇关于无法运行带有Mono的.net应用-找不到mscorlib.dll(版本不匹配?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆