Reflection
Hi, I am rather new in using smartassembly.
I have an issue with reflection. It's general but I will try to specialize.
There is a type let it be TypeA in assembly AssemblyA which is merged to the main executable assembly. No obfuscation, no pruning, no nothing. Just merged.
There is a point in my code where I call:
type.GetCustomAttributes(...) where type == typeof(TypeA) which means TypeA is already known to the runtime and AssemblyA already loaded. At least it should be.
But I get an exception saying that AssemblyA could not be loaded (or one of the dependencies, which by the way are all in place).
From these I gather that GetCustomAttributes somehow tries to re-load AssemblyA from a file.
Can you shed any light on my drama?
I have an issue with reflection. It's general but I will try to specialize.
There is a type let it be TypeA in assembly AssemblyA which is merged to the main executable assembly. No obfuscation, no pruning, no nothing. Just merged.
There is a point in my code where I call:
type.GetCustomAttributes(...) where type == typeof(TypeA) which means TypeA is already known to the runtime and AssemblyA already loaded. At least it should be.
But I get an exception saying that AssemblyA could not be loaded (or one of the dependencies, which by the way are all in place).
From these I gather that GetCustomAttributes somehow tries to re-load AssemblyA from a file.
Can you shed any light on my drama?
Comments
SmartAssembly merging can cause problems with type equivilence, according to Alex. There is a blurb about that elsewhere on the forum but not further information or fix action. I think you just have to try embedding instead.