How can we help you today? How can we help you today?

Multiple dependencies obfuscation

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
0

Comments

3 comments

  • Brian Donahue
    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:
    <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
    0
  • olcay
    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
    0
  • Brian Donahue
    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
    0

Add comment

Please sign in to leave a comment.