[Mono-list] "mscorlib.dll is an invalid CIL image"

Jonathan Pryor jonpryor at vt.edu
Wed Apr 29 09:50:16 EDT 2009


On Tue, 2009-04-28 at 19:28 -0700, Chris Plasun wrote:
> > So what you _can_ do is build e.g. Mono 2.4 on openSUSE, Mono 2.4 on
> > Linux/PPC, and copy the mscorlib.dll from your openSUSE build to
> > Linux/PPC, but you cannot e.g. take an mscorlib.dll from Mono 2.0
> > (openSUSE packaged version) and run it against a Mono 2.4 runtime.  The
> > versions *must* be the same (and this is checked at program startup).
> 
> Yes, but I did run the same version (or so I think) version of mscorlib.dll.
> 
> Is the problem to with the fact that I took mscorlib.dll for SUSE and 
> tried to use it on the PowerPC board?
> 
> I matched the version numbers (the directory names?).

That's not the version to match.  The directory names
($prefix/lib/mono/2.0/mscorlib.dll) contain the *profile* version, NOT
the Mono version.  So both Mono 2.0 and Mono 2.4 will contain a
$prefix/lib/mono/2.0/mscorlib.dll file, but you CANNOT use mscorlib.dll
from Mono 2.4 with Mono 2.0 (and vice versa).

Thus, you can't use the directory names to determine version numbers,
you have to know which Mono versions are involved.

Furthermore, based on the commands your contractor supposedly ran, your
contractor built Mono 2.2.  This is not part of any openSUSE release;
openSUSE 11.1 contains 2.0, while openSUSE 11.2 (in development) will
likely contain Mono 2.4 or 2.6, so if you're trying to use the openSUSE
distro-provided mscorlib.dll, it likely will not work.

> How can I concretely determine what version of mscorlib.dll I'm using? 
> Lutz Reflector?

Know where you got the binary from.

The easiest way is to just build Mono yourself from source on all
platforms, using the same tarball, thus ensuring that you have the same
Mono version everywhere.

 - Jon




More information about the Mono-list mailing list