[Mono-osx] ServicePointManager using 2.0
duane at wandless.net
Wed Nov 19 07:12:06 EST 2008
I no longer get this issue but as I indicated and you tried the EXE is
required. All of my searching pointed to the DLL not initializing the
environment correctly. And I tried to set some of the variables manually
that the code appeared to need, that never worked. Maybe the call to
mono_domain_assembly_open is required.
Here again is how I currently init the 2.0.1 mono environment from within my
NSString *libraryPath = [[[NSBundle mainBundle] bundlePath]
NSString *sampleAssemblyPath = [libraryPath
NSLog(@"libraryPath: %@", sampleAssemblyPath);
domain = mono_jit_init ([sampleAssemblyPath UTF8String]);
MonoAssembly *monoAssembly = mono_domain_assembly_open(domain,
NSLog(@"sample assembly: %p", monoAssembly);
mono_jit_exec (domain, monoAssembly, 1, argv);
On Wed, Nov 19, 2008 at 6:04 AM, silver83 <silver83 at gmail.com> wrote:
> I'm experiencing a similar issue with 2.0, with a stack trace leading to
> same exception at
> (starting around the ctor for Socket, but that's irrelevant. )
> Anyway - I DID switch my assembly to be an EXE, and trying to perform :
> MonoDomain *domain;
> domain = mono_jit_init (file_name);
> mono_jit_exec (domain, assembly, argc - 1, argv + 1);
> Results in the same exception.
> Trying to revert to 1.9.1 and test.
> Is there a workaround for this in the api ? What is the configuration file
> it's missing ? Maybe I can supply a dummy or something of that form...
> duanew wrote:
> > "Random assembly"? What are you referring to? There is nothing random.
> > In 1.9 mono I had a working program loading a DLL from an ObjC embedded
> > envrionment. In 2.0 this broke. I traced the issue to
> > ConfigurationManager.cs. When invoked from an embedded DLL the required
> > configuration values are not being set. A lot of changes happened in and
> > around this file between 1.9 and 2.0. One of those changes broke the
> > ability for a DLL to be setup correctly from an embedded environment.
> > If you can provide an example of a DLL being invoked from an ObjC
> > environment and having it initialize correctly then I'd happily switch
> > back
> > to a DLL. As it is I must workaround the issue by compiling my C# code
> > into
> > an EXE.
> > On Mon, Oct 27, 2008 at 11:11 AM, Paolo Molaro <lupus at ximian.com> wrote:
> >> On 10/24/08 Duane Wandless wrote:
> >> > Thanks for the reply. I did call mono_jit_exec. But I'm using a DLL
> >> ...
> >> > not an executable. I get a message back after calling mono_jit_exec
> >> my
> >> > DLL:
> >> > doesn't have an entry point
> >> >
> >> > And it fails as described in my first posts. Now maybe the entry
> >> is a
> >> > different signature for the DLL. I did not pursue this since it is
> >> > required that my C# code be in a DLL. So I changed to an EXE and call
> >> > mono_jit_exec which allows my C# code to work as expected.
> >> Sure, mono_jit_exec() needs an assembly with an entrypoint to execute,
> >> if you throw it a random assembly how do you expect it to work?
> >> lupus
> >> --
> >> -----------------------------------------------------------------
> >> lupus at debian.org debian/rules
> >> lupus at ximian.com Monkeys do it better
> >> _______________________________________________
> >> Mono-osx mailing list
> >> Mono-osx at lists.ximian.com
> >> http://lists.ximian.com/mailman/listinfo/mono-osx
> > _______________________________________________
> > Mono-osx mailing list
> > Mono-osx at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-osx
> View this message in context:
> Sent from the Mono - OSX mailing list archive at Nabble.com.
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx