Re: Returning a CLR type from IronRuby

Curt Hagenlocher <[email protected]> Tue, 3 Mar 2009 06:02:49 -0800
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Message-ID <[email protected]>
On Tue, Mar 3, 2009 at 4:10 AM, Paul Cowan <[email protected]> wrote:
> It is definitely the right assembly and I did post the question on IronRuby
> but have not got an answer yet.

I don't recall having seen this on the IronRuby list (at least not recently).

> 2009/3/3 Fabian Schmied <[email protected]>
>
> While you'd probably get better answers at a Ruby-specific site, I'll
> give it a try: The problem seems to be that IronRuby loads the
> Horn.Core.DSL.Domain.dll assembly for a second time (and from a
> different location), so the BuildMetaData type used by your IronRuby
> class is not the same as the one used by the C# class.
>
> Can you try to do the following:
> engine.Runtime.LoadAssembly (typeof (BuildMetaData).Assembly); // or
> similar at the beginning?

This should resolve the problem, but you also need to remove the
"require" from the Ruby script.

--
Curt Hagenlocher
[email protected]

===================================
View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives