tags:

views:

160

answers:

1

Hi, I've spent a considerable amount of time trying to make a bundle with mono. I can run the program just fine saying

mono program.exe

but when I say

 mkbundle --deps -o test test.exe

It outputs

OS is: Linux
Sources: 1 Auto-dependencies: True
   embedding: /home/chris/Documents/Depot/test/bin/Release/test.exe
   embedding: /usr/lib/mono/1.0/mscorlib.dll
   embedding: /usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
   embedding: /usr/lib/mono/gac/System/1.0.5000.0__b77a5c561934e089/System.dll
   embedding: /usr/lib/mono/gac/System.Xml/1.0.5000.0__b77a5c561934e089/System.Xml.dll
Compiling:
as -o temp.o temp.s 
cc -ggdb -o test -Wall temp.c `pkg-config --cflags --libs mono`  temp.o
Done

And when I try to run it it says

** (test.exe:21988): WARNING **: The class System.Collections.Generic.List`1 could not be loaded, used in mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Unhandled Exception: System.TypeLoadException: A type load exception has occurred.

I noticed it was copying in mscorlib.dll from the 1.0 folder. I tried putting version 2.0 in this folder and it solved the generic list type load error, but now I'm getting a stopwatch and semaphore type load error.

How can I make a bundle with all these types I need in it?

+2  A: 

You seem to want mkbundle2, which links to the 2.0 runtime.

Benjamin Podszun
Oh, that was easy! I spent so much time trying to get mkbundle to work ... Thanks!
Chris