Welcome to the &quot;wonderful&quot; world of Fusion.<div><br></div><div>If you use Assembly.LoadFrom, then you can only use the assembly reference itself to get the types. The canonical names don&#39;t match assemblies loaded using LoadFrom.&nbsp;To use Assembly.Load, it has to be in one of the approved search paths (which, by default, is the path of the launching executable only, plus the GAC of course).</div>
<div><br></div><div>We went through an almost excruciating amount of pain with assembly load paths and such to make all this work correctly in xUnit.net.<br clear="all"><br>--<br>Brad &nbsp; &nbsp;<a href="http://bradwilson.typepad.com/">http://bradwilson.typepad.com/</a><br>

<br><br><div class="gmail_quote">On Mon, Dec 8, 2008 at 12:33 PM, Aaron Feng <span dir="ltr">&lt;<a href="mailto:aaron.feng@gmail.com">aaron.feng@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<span style="color:rgb(0, 0, 0)">Ok,&nbsp; I got </span><span style="font-size:11pt;color:rgb(0, 0, 0)">Assembly.Load and </span><span style="font-size:11pt;color:rgb(31, 73, 125)"><span style="color:rgb(0, 0, 0)">Type.get_type both to work with my own DLL.&nbsp; The actual DLL have to live where ir.exe lives.&nbsp; Is there a way for it to look in the directory of the ruby file?&nbsp; Like the way require statement work.<br>

<br>Aaron<br></span><br><br></span><br><div class="gmail_quote">On Mon, Dec 8, 2008 at 2:11 PM, Tomas Matousek <span dir="ltr">&lt;<a href="mailto:Tomas.Matousek@microsoft.com" target="_blank">Tomas.Matousek@microsoft.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><span style="font-size:11pt;color:rgb(31, 73, 125)">Can you load the assembly and get the type explicitly?</span></p>

<p><span style="font-size:11pt;color:rgb(31, 73, 125)">&nbsp;</span></p>

<p><span style="font-size:11pt;color:rgb(31, 73, 125)">require &#39;mscorlib&#39;</span></p>

<p><span style="font-size:11pt;color:rgb(31, 73, 125)">System::Reflection::Assembly.Load(&quot;IronNails.Library,
Version=<a href="http://1.0.0.0" target="_blank">1.0.0.0</a>, Culture=neutral, PublicKeyToken=null&quot;).GetType(</span>&#39;IronNails.View.XamlProxy&#39;)<span style="font-size:11pt;color:rgb(31, 73, 125)"></span></p>

<p><span style="font-size:11pt;color:rgb(31, 73, 125)">&nbsp;</span></p>

<p><span style="font-size:11pt;color:rgb(31, 73, 125)">Tomas</span></p>

<p><span style="font-size:11pt;color:rgb(31, 73, 125)">&nbsp;</span></p>

<div style="border-style:solid none none;border-color:rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;border-width:1pt medium medium;padding:3pt 0in 0in">

<p><b><span style="font-size:10pt">From:</span></b><span style="font-size:10pt"> <a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a>
[mailto:<a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a>] <b>On Behalf Of </b>Ivan Porto
Carrero<br>
<b>Sent:</b> Monday, December 08, 2008 9:46 AM<div><br>
<b>To:</b> <a href="mailto:ironruby-core@rubyforge.org" target="_blank">ironruby-core@rubyforge.org</a><br>
</div><b>Subject:</b> Re: [Ironruby-core] Handling C# lower case namespaces</span></p>

</div><div><div></div><div>

<p>&nbsp;</p>

<p style="margin-bottom:12pt">I get the same behavior.<br>
I can load types from the CLR but not from my own assembly.<br>
<br>
I copied my assembly into the folder that contains ir.exe<br>
<br>
&gt;&gt;&gt; require &#39;mscorlib&#39;<br>
=&gt; true<br>
&gt;&gt;&gt; require &#39;IronNails.Library, Version=<a href="http://1.0.0.0" target="_blank">1.0.0.0</a>,
Culture=neutral, PublicKeyToken=null&#39;<br>
=&gt; true<br>
&gt;&gt;&gt; IronNails::View::XamlProxy<br>
=&gt; IronNails::View::XamlProxy<br>
&gt;&gt;&gt; System::Type.get_type &#39;IronNails.View.XamlProxy&#39;<br>
=&gt; nil<br>
&gt;&gt;&gt; System::Type.get_type &#39;System.String&#39;<br>
=&gt; #&lt;System::RuntimeType:0x000005c&gt;<br>
&gt;&gt;&gt; IronNails::View::XamlProxy.to_clr_type<br>
=&gt; #&lt;System::RuntimeType:0x000005e&gt;<br clear="all">
<br>
<br>
<br>
</p>

<div>

<p>On Mon, Dec 8, 2008 at 5:54 PM, Aaron Feng &lt;<a href="mailto:aaron.feng@gmail.com" target="_blank">aaron.feng@gmail.com</a>&gt; wrote:</p>

<p style="margin-bottom:12pt">Tomas,<br>
<br>
I tried it again.&nbsp; I couldn&#39;t get the following to work with my own DLL
even If I capitalize the namespace (It does work fine with build in types like
System.String):<br>
<br>
&gt; <span style="font-size:11pt;color:rgb(31, 73, 125)">System::Type.get_type(&quot;Abc.Hi,
Version=<a href="http://1.0.0.0" target="_blank">1.0.0.0</a>, Culture=neutral,
PublicKeyToken=null&quot;)<br>
<br>
</span>Do I have any other options?<br>
<br>
Thanks,<br>
<span style="color:rgb(136, 136, 136)"><br>
Aaron<br>
</span><br>
_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org" target="_blank">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a></p>

</div>

<p>&nbsp;</p>

</div></div></div>

</div>


<br>_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org" target="_blank">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>
<br></blockquote></div><br></div>