kchristokchristo Posts: 4
edited January 25, 2011 8:26AM in SmartAssembly 5
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? :wink:


  • Brian DonahueBrian Donahue Posts: 6,590 New member

    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.
  • Thanks for the reply. I will try this and inform you about the results
  • This did work actually. I have another issue now which I will have to solve on my own. I already have implemented a solution of 10 smartassembly projects to protect projects that could not be merged or embeded to the main executable assembly, at least not without unwanted re-engineering. What I am trying to do now is somehow manage to have less files distributed. But embedding (even if a solve other issues) does not provide for obfuscation and the more I look into my situation the more I believe I will have to compromise with the 10 projects approach. :cry:
Sign In or Register to comment.