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

Jonathan Pryor jonpryor at vt.edu
Tue Apr 28 20:12:22 EDT 2009


On Tue, 2009-04-28 at 14:29 -0700, Chris Plasun wrote:
> I'm trying to get Mono working on a Freescale MPC8313 PowerPC embedded Linux board.
> 
> When I try to run a 'hello world' application I get the following error:
> 
> "mscorlib.dll is an invalid CIL image"

This came up on #mono a few weeks ago, I believe.  I forget the
platform, but I remember the problem: as part of the embedded build
process, there was a post-processing step over the assemblies that was
rendering them invalid (because the post-processing step was presumably
for ELF shared libraries, so it completely screwed up the assemblies).

So do three things:

1. Try to run monodis against your created mscorlib.dll.

2. Copy your created mscorlib.dll to a different machine, and run
monodis on the other machine.

3. For good measure, copy the installation directory from a working
machine onto your MPC8313 machine, and try running your app again.

It should be noted that *.dll/*.exe files don't need to be built on the
host machine; they're platform independent, and thus can be copied
directly from any machine with a known working build.

 - Jon




More information about the Mono-list mailing list