Errors late-binding .net2.0 assembly from .net1.1

  • Thread starter Thread starter tlwright1414
  • Start date Start date
T

tlwright1414

I'm trying to late bind and invoke a method on a .net 2.0 assembly from
a .net 1.1 assembly. I'm getting and error 'The format of the file
'myAssembly.dll' is Invalid. Can't figure it out. Any suggestions are
much appreciated.

Assembly p = Assembly.LoadFrom( asFilePath );
object o = p.CreateInstance( asClassName );
object[] args = new object[4]{m_AssemblyDoc, ao, m_ProcessesDoc,
cbProduct.SelectedItem};

MethodInfo Method = o.GetType().GetMethod("Process");
Object obj = Activator.CreateInstance(o.GetType());
Method.Invoke( obj, args );
 
I'm trying to late bind and invoke a method on a .net 2.0 assembly from
a .net 1.1 assembly.

2.0 assemblies can only be loaded by the 2.0 CLR. I suspect you're
running with a previous version loaded.


Mattias
 
Back
Top