| Author |
Message |
kchristo
Joined: 25 Jan 2011 Posts: 3
|
Posted: Tue Jan 25, 2011 11:43 am Post subject: 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?  |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6348 Location: Red Gate Software
|
Posted: Tue Jan 25, 2011 2:14 pm Post subject: |
|
|
Hi,
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
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
kchristo
Joined: 25 Jan 2011 Posts: 3
|
Posted: Tue Jan 25, 2011 2:19 pm Post subject: Thanks |
|
|
| Thanks for the reply. I will try this and inform you about the results |
|
| Back to top |
|
 |
kchristo
Joined: 25 Jan 2011 Posts: 3
|
Posted: Tue Jan 25, 2011 2:26 pm Post subject: Partial success |
|
|
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.  |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group