Home - Forums-.NET - Spices.Net - Multi-assembly project, obfuscate publics

Spices.Net

NET code security, tools to protect, obfuscate, tamper defense, code and data safety, recover, convert, optimize, explore, browse and analyze .Net software.

This forum related to following products: Spices.Net Suite, Spices.Net Obfuscator, Spices.Net Decompiler

Multi-assembly project, obfuscate publics
Link Posted: 09-Apr-2006 11:28
Hi,

I'm having problems obfuscating public methods/properties in assemblies that are referenced by other assemblies in one project. I'm always getting something like: System.TypeLoadException: Could not load type 'NCompass.Utilities.Converter' from assembly 'NCompass.Utilities, Version=1.0.22.0, Culture=neutral, PublicKeyToken=f333359279eb8d64'.
Am I doing something wrong here or is that something that can't be done in general?
Link Posted: 09-Apr-2006 14:45
Problem in that name of the type (that is referenced from running assembly) is obfuscated and assembly can't load type.
Include into one Spices.Project  all assemblies of your application (excluding 3rd party assemblies and standard/system .Net assemblies), specify ObfuscationOptions for each assembly (see the PropertiesTab, AssemblyList property and expand this property to find obfuscation settings for each assembly).
In this case assemblies will cross-obfuscated. This means that some public member(type, method etc ), obfuscated in the some assembly, will obfuscated in all referenced to this member assemblies.
NB: cross-obfuscation increase level of protection.
Link Posted: 09-Apr-2006 21:04
Well, I have all assemblies included in the spices project and am still getting that exception?
Might the problem be within v5 which I can't register as registering doesn't work?
Link Posted: 09-Apr-2006 21:10
Also, another issue is that I can set the strong name key for re-signing only global and not individually by assembly. I have some assemblies which I do not want to be signed
Link Posted: 09-Apr-2006 21:56
And yet another problem are assemblies that are dynamically loaded with Assembly.Load.
Although I have DataFeed assembly, DataFeed.ESignal assembly and DataFeed.Fimat assembly in the spices solution and only set obfuscation to default, it fails to load assemblies.
Link Posted: 10-Apr-2006 01:58
Well, I have all assemblies included in the spices project and am still getting that exception?
Might the problem be within v5 which I can't register as registering doesn't work?

No, v5 fully featured, has a temporarily license and doesn't require registration.
Can you send me your assemblies or provide me with link to more operatively solve this problem (use address, please zip)?

Also, another issue is that I can set the strong name key for re-signing only global and not individually by assembly. I have some assemblies which I do not want to be signed

Do not worry about it, assembly will not signed if original assembly not signed.

And yet another problem are assemblies that are dynamically loaded with Assembly.Load.
Although I have DataFeed assembly, DataFeed.ESignal assembly and DataFeed.Fimat assembly in the spices solution and only set obfuscation to default, it fails to load assemblies.

Please send us your project to solve this problem operatively.
Link Posted: 10-Apr-2006 02:04
Also - to solve \"type loading\" problem - try to exclude this type from obfuscation.
You can exclude this type by following ways:
1. Mark this type by NineRays.Obfuscator.NotObfuscateAttribute (you can find the source of ofuscation control attributes in the \\SDK\\Obfuscation Attributes folder and include this file to your project).
2. Use ExclusionPatterns collection of Spices.Project to exclude this type - simply add NCompass.Utilities.Converter* string to the collection of exclusions.
3. Use Excludes collection of Spices.Project and add this type into this list.