Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
969 views
in Technique[技术] by (71.8m points)

ubuntu - Unable to run .net app with Mono - mscorlib.dll not found (version mismatch?)

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.

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

I get the error:

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'.

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.

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I got it to work by installing mono-complete:

sudo apt-get install mono-complete

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...