[Mono-list] teste.exe - mscorlib.dll not found

Jonathan Pryor jonpryor at vt.edu
Mon Apr 13 10:35:39 EDT 2009


On Sun, 2009-04-12 at 14:22 -0700, fozzie wrote:
> I would also like to reduce the size of the lib/mono folder (currently ~
> 160Mb). Is there a minimal set of folders? I'm not sure if i need "boo" or
> "monodoc"..

The minimal set of folders is:

  - lib/mono/PROFILE
    - PROFILE == 1.0, 2.0, etc., depending on what framework version 
      you're targeting.	
  - lib/mono/gac

The other directories you see (lib/mono/monodoc/, etc.) are gacutil
package directories.  They can be removed...but at the cost of killing
pkg-config .pc files (which usually use the package directory name
instead of a full path into the GAC).  Of course, if this is for an
embedded environment, you won't care about pkg-config...

However, the gacutil package directories are also small --
lib/mono/monodoc only contains a symlink, so removing it won't save you
much space.

The real users of space are lib/mono/PROFILE (12MB for 2.0, 6.1MB for
1.0) and lib/mono/gac (73MB for my ~fresh install), which contains the
actual assemblies.  Here is where you can really cut down on space --
for example, my install has *3* versions of System.dll:

  - lib/mono/gac/System/1.0.5000.0__b77a5c561934e089/System.dll
  - lib/mono/gac/System/2.0.0.0__b77a5c561934e089/System.dll
  - lib/mono/gac/System/2.0.5.0__7cec85d7bea7798e/System.dll

These are for the 1.0, 2.0 and Silverlight profiles (respectively).
Thus, if you're bundling your own Mono, and only need to support one
profile...don't ship all three profiles, only ship the version you need.
The same is true for most of the System.* assemblies within the GAC.

Of course, the *easier* way to do this isn't to muck around within
lib/mono/gac etc., it's to instead use the Mono Linker to get a minimal
set of assemblies, and then just ship the linked version.

  http://www.mono-project.com/Linker
  http://www.go-mono.com/docs/index.aspx?tlink=11@man%3amonolinker(1)

 - Jon




More information about the Mono-list mailing list