Thanks. I tried creating a test assembly with just a default constructor and no other dependencies, and I get the same error when I try to import it. <br><br>I also tried setting the path variable, through windows as well as in code, and get the same result.<br>
<br>Assuming my dll is named "TestLib.dll", I should be able to do clr.AddReference("TestLib"), correct?<br><br>Do I have to strong name my assemblies, or put them in the GAC? Or is that optional?<br>
<br>Any other suggestions of how to track this down? <br><br><div class="gmail_quote">On Tue, Dec 14, 2010 at 7:21 PM, Laszlo Sebo <span dir="ltr"><<a href="mailto:laszlo.sebo@primefocusworld.com">laszlo.sebo@primefocusworld.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
It appears that some reference dependencies of the My.DLL assembly
(the assembly containing HFF.Helper.Utilities ?) weren't found.<br>
<br>
Make sure that whichever referenced assembly has those classes is
accessible through the path env variables. If needed, you can add it
inside python, by simply doing something like:<br>
<br>
import sys<br>
sys.path.append('place where my dlls are')<br>
<br>
This is probably the best documentation out there:<br>
<a href="http://pythonnet.sourceforge.net/readme.html" target="_blank">http://pythonnet.sourceforge.net/readme.html</a><br>
<br>
But once you get the initial assemblies to work, its fairly
straightforward since you just use the .net classes natively from
python.<br>
<br>
<br>
cheers,<br><font color="#888888">
laszlo</font><div><div></div><div class="h5"><br>
<br>
<br>
On 14/12/2010 4:53 PM, Jason Awbrey wrote:
<blockquote type="cite">I'm evaluating PDN for use in an upcoming project.<br>
<br>
1. installed Python 2.6.5<br>
2. installed PDN - copied the clr.pyd file to Python's DLLs
folder, and copied Python.Runtime.dll to Python's root<br>
3. copy my dll (VS2010, simple C# class lib with two methods) into
Python's root.<br>
4. start python (using the python.exe from 2.6.5, not the one from
PDN)<br>
<br>
<div style="margin-left: 40px;">>>> import clr<br>
>>> clr.AddReference("My.DLL")<br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br>
System.IO.FileNotFoundException: Unable to find assembly
'HFF.Helper.Utilities'.<br>
<br>
at Python.Runtime.CLRModule.AddReference(String name)<br>
>>><br>
<br>
</div>
I assume I'm making some incredibly obvious newbie error. Can
anyone point me in the right direction?<br>
<br>
And, where can I find good docs/reference/discussion on using PDN?<br>
<br>
thanks - Jason<br>
</blockquote>
<br>
</div></div></div>
<br>_________________________________________________<br>
Python.NET mailing list - <a href="mailto:PythonDotNet@python.org">PythonDotNet@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/pythondotnet" target="_blank">http://mail.python.org/mailman/listinfo/pythondotnet</a><br></blockquote></div><br>