Smartassembly User Guide

Source: Internet
Author: User
Tags reflector

Smartassembly provides a method to optimize and confuse your. netProgramTo protect your work and software, reduce the size of the distribution package, and improve program performance. Visual Studio 2003/2005/2008 integrates a dotfuscatorCommunityVersion of the tool, the function is very simple, easy to use, specific operations can be referred to the followingArticle: Use of dotfuscator in Visual Studio 2008

Here, demonstrate the use of smartassembly obfuscation tool, the tool features relatively strong (http://www.smartassembly.com), has been acquired by Redgate, interested friends can download. The following describes the procedure.

1. Start the smartassembly application, enter the main interface, and click the new project button to create a new project.

2. Select the main assembly to be improved and protected. It can be a Windows Forms Application, WPF application, console program, DLL assembly, Asp.net web application, and so on.

Here, I will demonstrate how to protect an Asp.net web application. Click the Browse Assembly button and select the Assembly after the web application is compiled.

3. After selecting the main assembly, return to the smartassembly interface, as shown in. Set the location where the Assembly is stored after being processed by smartassembly. Click set destination.

4. Set the program parameters of smartassembly one by one. The first one is dependencies merging, which sets other related assemblies that the main assembly depends on.

For this example, select Biz/DAC/entity/common dependent assembly. What's amazing is that these dependent assembly programs are merged into the main assembly. In this way, you only need to release the main program during the release, and the dependent assembly does not need to be released together.

In addition, we recommend that you do not select a third-party assembly, as shown in. We do not need to select an Assembly related to the Enterprise Library. In this way, third-party Assembly needs to be protected when applications are published.

5. Simplified pruningCodeIn this step, some useless code and metadata will be deleted from the Assembly. Smartassembly checks the code in the Assembly to automatically determine which code is useful and which code is never executed. At the same time, useless metadata will be removed. You can also select the master assembly and the dependent assembly for simplified code operations.

Here, I did not select any assembly. If you have any interests, try it.

6. obfuscation code

Obfuscation code is the most important way to protect your assembly. It changes the names of classes and methods to unreadable characters, but does not change the functions of the Code to protect the code. At the same time, the metadata can be reduced to reduce the Assembly size.

Here, I chose the main assembly and all dependent assembly for obfuscation, as shown in.

There are also obfuscation settings for types/methods names and fields names. Keep the default values here.

There are many other options in the future. Here we will explain them one by one. If you are interested, you can check them yourself. These settings are sufficient to protect the released application code.

7. Build output obfuscated assembly

Click the build button to output the obfuscated assembly, and all the dependent assembly is merged, so that at the time of release, you only need to publish a merged assembly and a third-party assembly. In addition, you can also see that the size of the obfuscation/merging assembly must be smaller.

The latest version of smartassembly is available on csdn. You can download it and try it out, or download an evaluation version from the official website of smartassembly.

Finally, let's look at the decompilation effect in reflector. The decompilation code is too big.

In the smartassembly setting, there is an other protections option. You can add some incorrect metadata streams, as shown in, so that the Assembly cannot be opened when you use the reflector decompilation tool.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.