Strong name multiple assemblies

.NET obfuscator and automated error reporting

Strong name multiple assemblies

Postby Alex123456 » Wed Jun 25, 2014 3:56 pm

In my application I have 2 executables and about 50 dlls. I don't want to combine the dlls because I want to have the flexibility of updating individual dlls without shipping the 60MB+ executable to the client.

To obfuscate all the files I first create a project for every file and then I build each project. Here is the /create command:

SmartAssembly /create projectName.saproj /input=Example.exe /output=$self /keyfilename="MyKey.snk" /tamperprotection=true /reducemem=true /sealclasses=true /preventildasm=true /methodparentobfuscation=true /fieldobfuscation=3 /typemethodobfuscation=3 /stringsencoding=true;improved:true,compressencrypt:true,cache:true /errorreportingtemplate=auto;email="" /reportappname="Example" /reportcompanyname="" /assembly="Example";prune:true,nameobfuscate:true,controlflowobfuscate:3,dynamicproxy:true,compressencryptresources:true

The problem is when I try to execute my file after the obfuscation, it crashes with the following error:

An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module.

Additional information: Could not load file or assembly 'SomeDLL, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

When I obfuscate without strong naming the assemblies then it works fine. Any ideas where the problem is? Thanks


I might actually have an idea why it is failing... Basically I programmatically enumerate a folder full of assemblies, grab them in alphabetic order and build them one by one. I think the problem is that I first build an assembly that has dependencies (which dependency has not yet been build and strong signed), and only then I build and strong sign the dependent assembly (as it comes later in alphabetic order)... Any idea how to overcome this other than manually specifying the build order?
Posts: 3
Joined: Wed Jun 25, 2014 3:12 pm

Postby jessica.ramos » Thu Jun 26, 2014 10:30 pm

Hi Alex,

I'm afraid I don't have any ideas myself. :/ Specifying the build order sounds like the only option in this case.
Jessica Ramos
Technical Support
Red Gate Software Ltd.
Posts: 542
Joined: Mon Apr 23, 2012 12:13 pm

Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests