My problem: I have an assembly in 2 versions and want to use them at the same time in my Python project.
The .NET libs are installed in GAC (MSIL), having the same p
Well I found a solution: Python for .NET also supports Reflection!
Instead of
clr.AddReference("lib, Version=1.0.0.0, ...")
You have to use
assembly1 = clr.AddReference("lib, Version=1.0.0.0, ...")
With that assembly you can use all the Reflection stuff like in C#. In my example I have to use following code (same for version 2):
from System import Type
type1 = assembly1.GetType(...)
constructor1 = type1.GetConstructor(Type.EmptyTypes)
myClass1 = constructor1.Invoke([])