Best practice for Obfuscating a common .dll

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Best practice for Obfuscating a common .dll

Postby doobop » Tue Jul 08, 2014 9:30 pm

My deployment has 2 executables and a group of common .dlls which the 2 executables use. I currently have one project for the primary .dll and one project for each .exe (3 projects total). The .dll one is set to obfuscate the .dll and embed the other shared .dll's (merging will break things). The two .exe's will just obfuscate the .exe (no embedding). But, when generating references for the .exe's, it references the unobfuscated .dll. When I try to run either .exe, something isn't resolving.

So, what is the best way to configure this to use the common obfuscated .dll? Do I need to modify the .saproj file to set the path of the .dll? Better options?

Thanks.
doobop
 
Posts: 4
Joined: Thu Feb 13, 2014 10:20 pm

Postby jessica.ramos » Thu Jul 10, 2014 12:15 am

Hi there,

Thanks for you post!

You can direct SmartAssembly to use the obfuscated version of the .dll by adding MandatoryPath attributes to your exes' saproj files - http://documentation.red-gate.com/displ ... pendencies

However, if the exes are still referencing the unobfuscated version of the .dll, I'm not sure why that would cause assembly-resolving issues at runtime, since they will still use the obfuscated versions (assuming they're sitting alongside the exes) which *should* work alright..

Just to confirm--are the EXEs having trouble resolving the main .dll or one of its embedded ones?
Jessica Ramos
Technical Support
Red Gate Software Ltd.
jessica.ramos
 
Posts: 235
Joined: Mon Apr 23, 2012 1:13 pm


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests