CurrentDomain is a static method, not a class -- so you want
System::AppDomain.current_domain

The AssemblyResolve event comes with its own set of odd side effects that may 
bite, but it is how IronPython deals with the issue.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Hall
Sent: Wednesday, December 10, 2008 1:12 AM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] Loading Assemblies

Thanks for the responses.

Tomas is right, the appdomain didn't work (plus, it feels as dirty as
copying all the assemblies).

I wanted to hook into the AssemblyResolve event on the AppDomain,
however it appears as if I don't have access to the appdomain!  When I
try System::AppDomain::CurrentDomain.methods, I get a NameError again.
Disappointing :(

I'll see if I can come up with some hacky way, its a shame that I
can't manualy load in all the assemblies and you attempt to load them
from the AppDomain first (then I would have a require 'sdk.rb' file
with all the dependencies loaded in order)


Thanks

Ben

On Tue, Dec 9, 2008 at 9:46 PM, Tomas Matousek
<[EMAIL PROTECTED]> wrote:
> No. You need to set it in App.config. But I think the probe path could only 
> be a subdirectory of the app. That means a subdirectory of a path where 
> ir.exe is.
>
> We are working on improving assembly loading for IronRuby.
>
> Tomas
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thibaut Barrère
> Sent: Tuesday, December 09, 2008 11:46 AM
> To: ironruby-core@rubyforge.org
> Subject: Re: [Ironruby-core] Loading Assemblies
>
>> require 'C:\Program Files\SDK\a.dll'
>> require 'C:\Program Files\SDK\b.dll'
>> require 'C:\Program Files\SDK\c.dll'
>
> Never tried that with IronRuby, but would the following work ?
>
> $LOAD_PATH << 'C:\Program Files\SDK\'
>
> -- Thibaut
>
>>
>> B has a dependency on a.  a loads file, but when loading b.dll an
>> exception is thrown within LoadTypesFromAssembly because it cannot
>> find a.dll.
>>
>> This is a serious problem, without copying all the assemblies into my
>> IronRuby directory I'm not sure how to load the types and use our SDK?
>> Installing into the GAC isn't an option.
>>
>> Please help!
>>
>> Thanks
>>
>> Ben
>> _______________________________________________
>> Ironruby-core mailing list
>> Ironruby-core@rubyforge.org
>> http://rubyforge.org/mailman/listinfo/ironruby-core
>>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core@rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core@rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to