.NET obfuscator and automated error reporting


Postby kchristo » Tue Jan 25, 2011 10:43 am

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:
Posts: 3
Joined: Tue Jan 25, 2011 10:25 am

Postby Brian Donahue » Tue Jan 25, 2011 1:14 pm


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.
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am


Postby kchristo » Tue Jan 25, 2011 1:19 pm

Thanks for the reply. I will try this and inform you about the results
Posts: 3
Joined: Tue Jan 25, 2011 10:25 am

Partial success

Postby kchristo » Tue Jan 25, 2011 1:26 pm

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:
Posts: 3
Joined: Tue Jan 25, 2011 10:25 am

Return to SmartAssembly 5

Who is online

Users browsing this forum: No registered users and 0 guests