L
Livingston George
Hi,
I am using Reflection to load an assembly dynamically and calls methods on
one of its objects.
myassembly = Assembly.LoadFile("C:\MyAssembly.dll")
Dim myType as Type = myassembly.GetType("MyAssemblyNamespace.MyObject")
The above code was working fine until today.
Now, GetType returns nothing always. I checked with MSDN and tried to use
GetTypes() method which will load all the available types of the assembly.
But it is throwing me an error saying.
"System.Reflection.ReflectionTypeLoadException - One or more of the types in
the assembly unable to Load".
I dont understand why this was working so far and suddenly stopped working.
I did not change any code in my application or this assembly file.
Some other groups have suggested that if any of the assemblies which our
Reflection assembly (MyAssembly.dll here) is refering is unavailable then we
could run into this problem. But does it mean that I put all the assemblies
"Myassembly.dll" is refering too? Even the System assemblies and
InteropAssemblies??
Please give me a clear solution as I could not get it anywhere else.
Thanks and Regards,
Livingston George.
I am using Reflection to load an assembly dynamically and calls methods on
one of its objects.
myassembly = Assembly.LoadFile("C:\MyAssembly.dll")
Dim myType as Type = myassembly.GetType("MyAssemblyNamespace.MyObject")
The above code was working fine until today.
Now, GetType returns nothing always. I checked with MSDN and tried to use
GetTypes() method which will load all the available types of the assembly.
But it is throwing me an error saying.
"System.Reflection.ReflectionTypeLoadException - One or more of the types in
the assembly unable to Load".
I dont understand why this was working so far and suddenly stopped working.
I did not change any code in my application or this assembly file.
Some other groups have suggested that if any of the assemblies which our
Reflection assembly (MyAssembly.dll here) is refering is unavailable then we
could run into this problem. But does it mean that I put all the assemblies
"Myassembly.dll" is refering too? Even the System assemblies and
InteropAssemblies??
Please give me a clear solution as I could not get it anywhere else.
Thanks and Regards,
Livingston George.