Assemblies Merging

Eazfuscator.NET

Assemblies Merging

Introduction

Instructions

  1. Open obfuscatable project inside the IDE
  2. Add new source file to the project and call it ObfuscationSettings.cs (for C#) or ObfuscationSettings.vb (for Visual Basic .NET). You may prefer to use another name instead of ObfuscationSettings.cs or ObfuscationSettings.vb
  3. using System;
    using System.Reflection;
    
    [assembly: Obfuscation(Feature = "merge with XXXXXX.dll", Exclude = false)]
    Imports System
    Imports System.Reflection
    
    <Assembly: Obfuscation(Feature:="merge with XXXXXX.dll", Exclude:=False)> 
    
    [Note] Note
    [Tip] Tip
    [assembly: Obfuscation(Feature = @"merge with $(InputDir)\Lib\AssemblyToMerge.dll", Exclude = false)]
    [Tip] Tip
    using System;
    using System.Reflection;
    
    [assembly: Obfuscation(Feature = "merge with Assembly1.dll", Exclude = false)]
    [assembly: Obfuscation(Feature = "merge with AnotherAssembly2.dll", Exclude = false)]
    
[Note] Note

Tuning

[assembly: Obfuscation(Feature = "merge with [flags] XXXXXX.dll", Exclude = false)]
Flag Description
satellites Enables automatic merging of satellite assemblies
internalization=auto Instructs Eazfuscator.NET to automatically decide which public merged types should be internalized. This is the default setting. The typical decision is to internalize a given type. At the same time the type internalization can be inhibited, for example, by the fact that some kinds of WPF controls cannot have internal visibility
internalization=none Disables the internalization of public merged types
internalization=full Instructs Eazfuscator.NET to internalize all public merged types
using System;
using System.Reflection;

[assembly: Obfuscation(Feature = "merge with [satellites] XXXXXX.dll", Exclude = false)]
using System;
using System.Reflection;

[assembly: Obfuscation(Feature = "merge with [satellites internalization=none] XXXXXX.dll", Exclude = false)]

Internalization

  1. Open the source code of a class
  2. using System;
    using System.Reflection;
    
    [Obfuscation(Feature = "internalization", Exclude = true)]
    public class YourClass
    {
        ...
    }
    Imports System
    Imports System.Reflection
    
    <Obfuscation(Feature:="internalization", Exclude:=True)> 
    Class YourClass
        ...    
    End Class
    [Important] Important

Custom Parameters for Merging

  1. Open obfuscatable project inside the IDE
  2. Add new source file to the project and call it ObfuscationSettings.cs (for C#) or ObfuscationSettings.vb (for Visual Basic .NET). You may prefer to use another name instead of ObfuscationSettings.cs or ObfuscationSettings.vb
  3. using System;
    using System.Reflection;
    
    [assembly: Obfuscation(Feature = "ilmerge custom parameters: <parameters>", Exclude = false)]
    Imports System
    Imports System.Reflection
    
    <Assembly: Obfuscation(Feature:="ilmerge custom parameters: <parameters>", Exclude:=False)> 
    
    [Note] Note