G
Guest
Hi,
I am running the following vb code.
I am trying to dymanically load my assembly at runtime and run a method in it.
Dim ad As AppDomain
Dim i as myinterface
ad = AppDomain.CreateDomain("xxxx")
i= ad.CreateInstanceFromAndUnwrap("C:\ImportWS.dll",
"ImportWS.ImportWS")
But I get the following error:
An unhandled exception of type 'System.TypeLoadException' occurred in
mscorlib.dll
Additional information: Could not load type ImportWS from assembly ImportWS,
Version=1.0.2148.39870, Culture=neutral, PublicKeyToken=null because the
format is invalid.
I am referencing Excel in my assembly but little else.
Can anybody shed some light on this.
Thanks
Tim
I am running the following vb code.
I am trying to dymanically load my assembly at runtime and run a method in it.
Dim ad As AppDomain
Dim i as myinterface
ad = AppDomain.CreateDomain("xxxx")
i= ad.CreateInstanceFromAndUnwrap("C:\ImportWS.dll",
"ImportWS.ImportWS")
But I get the following error:
An unhandled exception of type 'System.TypeLoadException' occurred in
mscorlib.dll
Additional information: Could not load type ImportWS from assembly ImportWS,
Version=1.0.2148.39870, Culture=neutral, PublicKeyToken=null because the
format is invalid.
I am referencing Excel in my assembly but little else.
Can anybody shed some light on this.
Thanks
Tim