Multiple dependencies obfuscation

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, Alex.Davies, melvyn.harbour

Multiple dependencies obfuscation

Postby rcd.guerra » Tue Sep 14, 2010 9:59 am

Hello,

we are in the process of evaluating SA.
What is the best way of obfuscating dependant assemblies ?

We have a main application that will hold about a hundred referenced assemblies.
As a requirement we need to keep each reference as a separate file to ease the process of updating each reference.

If we use this main app as the base for SA, but without dependencies merging or embedding it seems we cannot obfuscate the referenced assemblies.
A solution would be to have an .saproj file for each assembly. Maybe using MSBuild support would be the best option.

We would also like to ask if there is a chance of having a master generic .saproj file that could be used for a set of assemblies because we want to apply the same obfuscation configuration to all, and creating a .saproj file seems a bit overwhelming.

Can you provide us some hint on this topic ?

Thanks in advance!

Kind regards,
Ricardo
rcd.guerra
 
Posts: 10
Joined: Mon Sep 13, 2010 5:43 pm

Postby Brian Donahue » Fri Sep 17, 2010 11:21 am

Hi Ricardo,

What I have recommended in the past is to set up a SmartAssembly project containing all of the settings that you want to use and add a task to the VS project file to do the build, changing the input and output tags to the name of the assembly. For example:
Code: Select all
 <Target Name="Obfuscate" Condition=" '$(Configuration)' == 'Release'">
    <SmartAssembly.MSBuild.Tasks.Build ProjectFile="Build for MyProject DLL.saproj" Input="..\\bin\\release\\MyAssembly.DLL" Output="..\\build\\MyAssembly.DLL"/>
The full set of options you can use with MSBUILD and VS Projects are documented here:
http://www.red-gate.com/supportcenter/C ... 032253.htm
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Multiple dependencies obfuscation

Postby olcay » Mon Nov 29, 2010 5:00 pm

We have the same problem but slightly different. We have a smart client app. that uses about 37 sub project which are DLLs and we use Click Once. The main program loads required assembly with reflection so we didnt reference other projects to main project. I dont want to build all assemblies one by one and the prior solution didnt work for me. Can you provide some clues about that and do i need to redirect all output file to obj\\release folder?
olcay
 
Posts: 1
Joined: Mon Nov 29, 2010 4:11 pm

Postby Brian Donahue » Wed Dec 01, 2010 10:55 am

I've been informed recently that changing the input and output of SmartAssembly doesn't work (any more?) for different assemblies. When I asked what those arguments could possibly be used for, the answer was that you can use them when you want to protect the same assembly specified in the project, but after you have moved the assembly to a different folder.

For different assemblies, you have to create new projects.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SmartAssembly 5

Who is online

Users browsing this forum: No registered users and 0 guests