# [Ironpython-users] Assembly references: file does not exist?

Tue Jun 28 15:25:00 CEST 2011

Hello,

I'm relatively new to IronPython and .Net, but reasonably familiar with Python.   I'm trying to write a .py script to use one of my employer's .NET dlls but whenever I try to AddReferenceToFileAndPath() I get an error:
IOError: System.IO.IOException: file does not exists: D:\path\to\my\dll
However, the DLL definitely exists at D:\path\to\my\dll and indeed works from there using my employer's app.

IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.225

My latest attempted code is as below, though I've tried a lot of various combinations:
import sys
sys.path.append(r"D:\path\to\my")
import clr

That last line raises the exception mentioned above with a stack trace where the first two lines are both from the IronPython's ClrModule.  I may be barking up the wrong tree here, but it leads me to believe that my entry DLL is trying to load another DLL and the system can't find the other one, even though it is in the same directory as the first dll.   Here's the first two lines of the stack trace (I can't copy'n'paste off the work machine where this is happening due to security constraints.)