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

Dave Peterson dpeterson at broadwaytechnology.com
Thu Jul 14 13:32:06 CEST 2011

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

-----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: Tuesday, July 05, 2011 11:34 AM
To: Markus Schaber; ironpython-users at python.org
Subject: Re: [Ironpython-users] Assembly references: file does not exist?

Hi Markus,

> Did you solve your problem yet?
> If not, could you try the following: Try to load the assembly using one of the static
> methods here: http://msdn.microsoft.com/de-de/library/system.reflection.assembly.aspx
> (You can do "from System.Reflection import Assembly" and then call the methods using
> "Assembly.Load(...)").

No, the problem isn't solved. I haven't had time to pursue it further as I had deadlines that forced me to do the task by writing C#.  However, your suggestion makes great sense and I will try to find time today to give it a shot.

-- Dave

P.S. I apologize for keeping full history in my earlier replies to the group.  I see that doing this spawned complaints about daily / weekly digests being hard to read, so I'll not do that anymore.

Ironpython-users mailing list
Ironpython-users at python.org

More information about the Ironpython-users mailing list