<div>Using basically this same code, it works for me. I'm using VS2008 Pro and IronPython 2.0b3. When creating the project in Visual Studio, I just picked "Class Library" under Visual C++/CLR in the "New Project" dialog.</div>
<div> </div>
<div>Can you email me a zipped copy of your DLL?<br><br></div>
<div class="gmail_quote">On Sun, Jul 6, 2008 at 10:40 AM, Todd Gruben <<a href="mailto:tgruben@gmail.com">tgruben@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">here is my quick and dirty class..<br><br><br><br>using namespace System;<br><br>namespace dtnnet {<br><br>
public ref class Feed<br> {<br> // TODO: Add your methods for this class here.<br> public:<br><br> String^ test(void)<br> {<br> return "Hello World";<br> }<br> };<br>
}<br><br><br>The Reflector says that this is the full path..<br>C:\Documents and Settings\tgruben\My Documents\Visual Studio 2008\Projects\dtnnet\Debug\dtnnet.dll<br><br><br>yet here is the output of my AddReference Attempt..<br>
<br><br>C:\Documents and Settings\tgruben\My Documents\Visual Studio 2008\Projects\dtnnet\Debug>ipy<br>IronPython 2.0 Beta (2.0.0.3000) on .NET 2.0.50727.1433<br>Copyright (c) Microsoft Corporation. All rights reserved.<br>
>>> import clr<br>>>> clr.AddReferenceToFileAndPath(r"C:\Documents and Settings\tgruben\My Documents\Visual Studio 2008\Projects\dtnnet\Debug\dtnnet.dll")<br>Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br>IOError: file does not exist: C:\Documents and Settings\tgruben\My Documents\Visual Studio 2008\Projects\dtnnet\Debug\dtnnet.dll<br>>>><br><br>yet i can do this ..<br>
f = open(r""C:\Documents and Settings\tgruben\My Documents\Visual Studio 2008\Projects\dtnnet\Debug\dtnnet.dll","r").read()<br>and print len(f) and get 36k which is the size of the file.<br><br>I'm sure its a configuration setting... if i point the addreferrence function to my c# library it just works. The c# does exactly the same thing, return a string.<br>
<br><br>Also if i just try and do AddReference("dtnnet.dll") from that directory, it just says failed to load assembly<br><br><br>I'm clueless..<br><font color="#888888"><br>-Todd<br><br></font><br>_______________________________________________<br>
Users mailing list<br><a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br><a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br></blockquote></div><br>