Red Gate forums :: View topic - Strong name multiple assemblies
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

Strong name multiple assemblies

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
Alex123456



Joined: 25 Jun 2014
Posts: 1

PostPosted: Wed Jun 25, 2014 4:56 pm    Post subject: Strong name multiple assemblies Reply with quote

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:

Quote:
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="example@example.com" /reportappname="Example" /reportcompanyname="Example.com" /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:

Quote:

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

Additional information: Could not load file or assembly 'SomeDLL, Version=5.0.75.5, 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

EDIT

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?
Back to top
View user's profile Send private message
jessica.ramos



Joined: 23 Apr 2012
Posts: 212

PostPosted: Thu Jun 26, 2014 11:30 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic 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