![]()
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. #USING DOTFUSCATOR VISUAL STUDIO 2015 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. #USING DOTFUSCATOR VISUAL STUDIO 2015 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?.Since by default, Dotfuscator will store the dotfuscated output under a subfolder called “ Dotfuscated”, the second command is basically copy the dotfuscated project output and overwrite the un-dotfuscated project output, therefore, when you build your setup project, the dotfuscated project output will be packaged in the final installer package. The first command is to run Dotfuscator in the command line on the target application to generate a dotfuscated version of the project output. “C:\Program Files (x86)\Microsoft Visual Studio 10.0\PreEmptive Solutions\Dotfuscator Community Edition\dotfuscatorCLI.exe” /in:$(TargetFileName)Ĭopy /y “$(TargetDir)Dotfuscated\$(TargetFileName)” “$(TargetDir)$(TargetFileName)” Now, right-click your target application in the Solution Explorer and choose Properties, then click on Build Events option on the left side:Ĭlick on Edit Post-build button and type in the following commands: I assume you know how to add Project Output of your target application to the setup project, so I will skip this step. Now let’s see how to use it in the setup project. #USING DOTFUSCATOR VISUAL STUDIO 2015 DOWNLOAD#After registration, download the CE installer and executed, it should automatically add the command line exe file to your computer. The command line file is called dotfuscatorCLI.exe and can be downloaded from PreEmptive’s web site after you register. In this post, I will show you how to use PreEmptive Dotfuscator Community Edition in Visual Studio 2010 setup project to protect your source code.īy default, PreEmptive Dotfuscator CE is integrated in Visual Studio 2010, however, it does not support the command line execution and you will need the command line ability to make it work in VS setup project. It only supports, at the time of this note, Visual Studio 20. NOTE: After chatting with PreEmptive support, I was told that the Command Line Interface of Dotfuscator CE does not support Visual Studio 2013 or lower. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |