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

Dave Peterson dpeterson at broadwaytechnology.com
Thu Jul 14 13:59:52 CEST 2011

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

-----Original Message-----
From: ironpython-users-bounces+dpeterson=broadwaytechnology.com at python.org [mailto:ironpython-users-bounces+dpeterson=broadwaytechnology.com at python.org] On Behalf Of Dave Peterson
Sent: Thursday, July 14, 2011 12:32 PM
To: Markus Schaber; ironpython-users at python.org
Subject: Re: [Ironpython-users] Assembly references: file does not exist?

Hi Markus,

Just got time to try this out.  When using Assembly.LoadFile(...) I get the following error:

IOError: System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

Ah, it's the issue where .NET 4 doesn't support automatically loading mixed mode assemblies (mine was definitely built as a .NET wrapper around a C++ DLL.)  This can be resolved by updating the App.Config for the application but how do I do that for an IronPython app?

-- Dave

More information about the Ironpython-users mailing list