

The question is, which of these configurations do you apply obfuscation to? When and When Not to Obfuscate?īy default, projects in a Visual Studio solution are configured with two solution configurations – the Debug solution configuration and the Release solution configuration. Other articles worth reading are this and this. Those of you who are new to obfuscation should read the article " Giving a NET Assembly a Strong Name" as it describes the difference between obfuscating a strong named assembly and obfuscating a delay signed assembly. In short, strong named assemblies are signed with the private token key from a cryptographic strong name key file, delay signed assemblies are signed with the public token key from a cryptographic strong name key file and private assemblies are not signed. This article assumes you understand the difference between these three types of assemblies.
#DOTFUSCATOR VISUAL STUDIO 2010 HOW TO#
The sample solution included with this article illustrates how to obfuscate private assemblies, strong named assemblies and delay signed assemblies. The sample solution uses PowerShell scripts. When the requirements are very simple, then the script can be written using batch commands and batch files, otherwise my recommendation is to write PowerShell scripts. In the current context, the script executes commands that obfuscate a project’s assembly. A post-build event is a user supplied script that executes a sequence of commands. More specifically, an assembly is obfuscated when a project’s post-build event is executed.

In the sample solution, an assembly is obfuscated immediately after a project’s assembly has been built. When Does a Project’s Assembly Get Obfuscated? However, most of the information in this article is applicable to other obfuscators that include a command line program. I found the GUI program is useful as a learning tool whereas the command line program is useful in automating the build process.ĭevelopment on and support of the ConfuserEx obfuscator stopped as of July, 2016. The sample solution included with this article does not use Dotfuscator but instead uses the obfuscator ConfuserEx, an open source project.Īssemblies can be obfuscated using a GUI program or a command line program - each has its use. The obfuscator included with Visual Studio is the community edition of Dotfuscator.


How Does an Assembly Get Obfuscated?Īn assembly is obfuscated using a program called an obfuscator. It is this assembly PrivateAssembly.dll which gets obfuscated. When this project is built, then the output is an assembly named PrivateAssembly.dll. For example, one of the projects in the sample solution included with this article is named PrivateAssembly. The answer is the assembly created when a project is built.
#DOTFUSCATOR VISUAL STUDIO 2010 CODE#
One of the questions I found posted in several forums asked what gets obfuscated, the source code or the assembly created when a project is built. It does not discuss the theory behind obfuscation or the effectiveness of obfuscation in protecting your intellectual property. It explains how to configure Visual Studio for obfuscation. This is an introductory article about obfuscation in Visual Studio. Requirements for building the sample solution.How to test that your assembly has been obfuscated?.The ObfuscatedRelease solution configuration.What type of assemblies are obfuscated?.When does a project’s assembly get obfuscated?.
