Mono Take Mscorlib.Dll 2.0 Instead of 4.0

Mono take mscorlib.dll 2.0 instead of 4.0

Finaly I found a solution for this problem:

https://bugs.launchpad.net/ubuntu/+source/gtk-sharp2/+bug/884035/comments/14

Simply modify the "app.config" file and change the content for this:

<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0"/></startup></configuration>

Recompile the proyect and now work fine.

Mono is using mscorlib.dll 2.0 instead of 4.0 in Ubuntu with ASP.NET Web application

This is how xsp works:

xsp2 => mscorlib.dll 2.0  
xsp4 => mscorlib.dll 4.0

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

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

How to get MonoDevelop to target .NET 2.0 framework with C# 4.0 compiler?

The 2.0 C# compilers (mcs/gmcs) that comes with the latest stable Mono version (2.10.9) support default function parameters. I just created a new console project, changed the target framework to 2.0 and compiled default function parameters successfully.

The assembly mscorlib.dll was not found or could not be loaded

I figured it out - I needed to set MONO_PATH to:

/opt/my-app/mono/lib/mono/4.0:/opt/my-app/mono/lib/mono/3.5:/opt/my-app/mono/lib/mono/2.0:.

So I needed to tell it where to look for libraries; I had (wrongly) assumed that would be automatic based on the location of the mono executable.

mscorlib error using .NET 4 on Mono using Mac OSX

Make an explicit reference to mscorlib, version 4 like this:

<Reference Include="mscorlib" />

Then another, similar error can show up (that you have not compatible FSharp.Core). This is because it is not 4.0 version of this library. You do not, however, need to recompile, as you can find compiled version in v4.0 subdirectory from package like this (note that its script does not installs v4.0 to gac). If you put 4.0 version to a place where MonoDevelop looks for it (probably /usr/lib/fsharp/), it should compile just fine.

Unable to start a mono-service2 daemon - missing method in /usr/local/lib/mono/2.0/mscorlib.dll

I just managed to find the problem, I had to use mono-service instead of mono-service2. It turned out that mono-service2 is meant for .Net 2 and mono-service for .Net 4.5!! You can test this with the following command:

grep exec `type -p mono-service` | head -n 1

Which outputs:

exec /usr/local/bin/mono $MONO_OPTIONS /usr/local/lib/mono/4.5/mono-service.exe $args

while

grep exec `type -p mono-service2` | head -n 1

outputs:

exec /usr/local/bin/mono $MONO_OPTIONS /usr/local/lib/mono/2.0/mono-service.exe $args

Anywho, I just hope others can benefit from my experience.

mono 3.0.1 asp.net An assembly with the same identity `mscorlib has already been imported. Consider removing one of the references

I wrote this post and found out the problem immediately after. It was indeed something wrong with XSP4 (or mono-fastcgi-server4). I installed mono 3.0.1 under the assumption that it would install the latest xsp. But that was not the case. So I downloaded the latest version from github. And my basic website was working again. But my website with entity framework is still not working didn't get the time to work that out yet. I was going to do that before I would report my findings here.



Related Topics



Leave a reply



Submit