<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.3790.2577" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=821273317-03012006><FONT face=Verdana 
color=#800000 size=2>clr.AddReferenceToFile doesn't return any value. It only 
adds reference to the .NET assembly. The assembly will then show up in 
clr.References tuple.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=821273317-03012006><FONT face=Verdana 
color=#800000 size=2>The way to use the clr.AddReference is the same as the 
former sys.LoadAssembly*:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=821273317-03012006><FONT face=Verdana 
color=#800000 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=821273317-03012006><FONT face=Verdana 
color=#800000 size=2>&gt;&gt;&gt; 
clr.AddReferenceToFile("csextend.dll")</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=821273317-03012006><FONT face=Verdana 
color=#800000 size=2>&gt;&gt;&gt; import Simple</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=821273317-03012006><FONT face=Verdana 
color=#800000 size=2>&gt;&gt;&gt; Simple(10)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=821273317-03012006><FONT face=Verdana 
color=#800000 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=821273317-03012006><FONT face=Verdana 
color=#800000 size=2>Martin</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> users-bounces@lists.ironpython.com 
[mailto:users-bounces@lists.ironpython.com] <B>On Behalf Of </B>Catalin 
Lungu<BR><B>Sent:</B> Tuesday, January 03, 2006 7:58 AM<BR><B>To:</B> Discussion 
of IronPython<BR><B>Subject:</B> [IronPython] IP Tutorial 
Error<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Hello,<BR>I compiled the folowing class with "csc" 
to csextend.dll</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>using System;<BR>using 
System.Collections;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>public class Simple<BR>{<BR>&nbsp;private int 
data;<BR>&nbsp;public Simple(int data)<BR>&nbsp;{<BR>&nbsp;&nbsp;this.data = 
data;<BR>&nbsp;}<BR>&nbsp;public override string 
ToString()<BR>&nbsp;{<BR>&nbsp;&nbsp;return String.Format("Simple&lt;{0}&gt;", 
data);<BR>&nbsp;}<BR>}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>When I try to use the "csextend.dll" module 
the&nbsp;return variable is null.<BR>&gt;&gt;import 
clr<BR>&gt;&gt;a=clr.AddReferenceToFile("csextend.dll")<BR>&gt;&gt;print 
a<BR>None<BR>By the way I have tried with another .cs module and I receive the 
same result.</FONT></DIV>
<DIV><FONT face=Arial size=2>I use VS2005 Professional and IronPython 1.0 - 
Beta1</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Any ideea?<BR>Catalin</FONT></DIV></BODY></HTML>