[Mono-dev] strange problem with mkbundle

Robert Jordan robertj at gmx.net
Thu Apr 26 13:34:05 UTC 2012


On 24.04.2012 12:46, michelw wrote:
> Hello,
>
> i've a strange problem.
>
> I do a simple program for test (download a http file, and print to
> console the file), who works fine on framework 2, 3, 3.5, 4.0. (on dev
> machine)
>
> First problem:
> When i use mkbundle -o mytest mytest.exe --deps --static, i see he
> always use /usr/lib/mono/4.0/mscorlib.dll and
> /usr/lib/mono/gac/***/4.0.0.0****, even i compile on 2,3,3.5, or 4.0....

This is by design. Use "mkbundle2" to bundle the 2.0 assemblies.

> Second: (very strange)
> When i launch my test program on another linux machine, who haven't
> mono, if i compile it with 4.0, i've the error :
> System.NotSupportedException: http://www.domain.com/page.php
> at System.Net.WebRequest.GetCreator (System.String prefix) [0x00000] in
>
> But, if i compile on 2,3 or 3.5, i've no error, test program works fine
> (remember he use /***/4.0 dll with mkbundle)

It seems that you have to bundle the machine config as well
when you're targeting the 4.0 runtime. See mkbundle's man page
on how to do this.

Robert




More information about the Mono-devel-list mailing list