[IronPython] Feature request: Make assembly loading strategy configurable.
Jeff at ingenio.com
Mon Feb 19 10:00:11 CET 2007
Iron Python installs a rather dragonic AssemblyResolve hook. It uses
Assembly.LoadFile to try to load an Assembly from the path when
resolution fails. I would prefer if Assembly.LoadFrom were provided at
least as an option, if not just made the standard behavior (once again).
The problem in my case is that Iron Python is linking to an application
that installs its own AssemblyResolve hook based on LoadFrom. Because
LoadFrom and LoadFile Assemblies are tracked separately it happens that
two copies of the same Assembly are loaded but they have incompatible
types so the application blows up. What's more, there may actually be
several identical copies of the same assembly floating around the search
path. This is because the application consists of an assortment of
plugin folders with locally copied (rather than shared) binaries.
Here's my current workaround. Ugly huh?
def AssemblyResolveWithLoadFrom(sender, e):
return System.Reflection.Assembly.LoadFrom(e.Name + ".dll")
More information about the Ironpython-users