Hi Doug,

Thanks for trying to help but please see the archives for the background on 
this issue as I've already done what you suggest and it doesn't work for my 
mixed-mode, .NET 2.0 generated DLL.

-- Dave


-----Original Message-----
From: Doug Blank [mailto:doug.bl...@gmail.com] 
Sent: Thursday, July 14, 2011 2:13 PM
To: Dave Peterson
Cc: Markus Schaber; ironpython-users@python.org
Subject: Re: [Ironpython-users] Assembly references: file does not exist?

On Thu, Jul 14, 2011 at 7:59 AM, Dave Peterson
<dpeter...@broadwaytechnology.com> wrote:
> Turns out that I can put an ipy.exe.config in the install location of 
> IronPython and get my assembly to load.
>
> Does anyone know if there's an equivalent programmatic way to do this?  For 
> example, can I import the clr module, call some .NET methods, and then try my 
> assembly loading?  I'm a .NET noob and I don't see any App or App.Config API 
> when I browse MSDN.   Am I just missing it?

Dave,

I have had no problems by putting the dll path on sys.path. Perhaps
Python is giving you a bad pathDir (maybe leaving out the drive?):

 pathDir = os.path.dirname(FULLPATH)
 sys.path.append(pathDir)

Here is an example where Graphics.dll is in /home/dblank/Calico/modules:

linux$ mono bin/ipy.exe
IronPython 3.0 (3.0.0.0) on .NET 2.0.50727.1433
Type "help", "copyright", "credits" or "license" for more information.
>>> import clr
>>> import sys
>>> sys.path.append("/home/dblank/Calico/modules")
>>> clr.AddReference("Graphics.dll")
>>> import Graphics

Hope that helps,

-Doug

_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
http://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to