try preemptive solutions now! try preemptive solutions now!

Home arrow Resources arrow Assembly Linking
 

Assembly Linking

Introduction

Assembly linking is a feature available in Dotfuscator Professional Edition to assist applications consisting of multiple .NET assemblies (executables and/or dynamic link libraries (DLLs)). Assembly linking prevents user errors due to misplaced assemblies, helps to reduce code bloat and further protects your software. This article provides an overview of assembly linking and its benefits.

What is Assembly Linking?

Assembly linking takes preexisting assemblies and merges them to produce a single assembly. This process has many beneficial effects, and can be combined with existing Dotfuscator features to secure and optimize your code.

simple linking 

Benefits

Assembly linking provides benefits for your .NET application in three key areas: optimization, usability and security.

Optimization

The assembly linking features in Dotfuscator Professional Edition can be combined with existing features to produce significant optimization on a .NET application.

When assembly linking is combined with the pruning feature, code bloat is considerably reduced. For example, imagine an application bundled with exhaustive third-party libraries. If the application only required a few methods from these libraries, it would still have to be packaged with the massive DLL files, increasing the memory footprint and the size of the distributable package.

no linking and pruning 

By using the assembly linking and pruning features together, Dotfuscator can merge the DLLs with the executable and then trim unused code in the libraries. The figure below shows how through Dotfuscator the methods in the third-party DLLs have been placed in the resulting merged executable with the unused library methods pruned out.

linking and pruning 

Usability

By placing the code from separate assemblies into your core executable, you ease the user experience and prevent the "DLL Hell" often associated with such files. When crucial DLLs go missing in a typical application, a full reinstall is usually required to replace them, which is inconvenient and can erase settings and other data. By placing the library code in the executable itself, assembly linking eliminates an additional source of error in your application.

Assembly linking also ensures that applications operate irrespective of changes in third-party libraries. A new version of a dynamic library may break old code, causing a problem that is often hard to diagnose. Developers may keep third-party libraries in DLL form during development, but can then use assembly linking to seal them inside the distributable application to prevent version mismatching on a user's computer.

Dotfuscator Professional will also handle name collisions automatically, preventing errors when merging libraries with identical type, method, and field names and making the assembly linking process completely automated.

Security

Clever hackers can create cracked assemblies to circumvent vital code like registration validation or to catch and intercept calls to external methods. Linking assemblies together prevents hackers from swapping in cracked files and compromising software.

Dotfuscator Professional can also hide important code placed in assemblies by combining obfuscation techniques with assembly linking. Method calls to unobfuscated assemblies must display their descriptive type, method, and field names, allowing hackers to better understand decompiled code and to localize their reverse-engineering efforts. When assembly linking and obfuscation are used, however, this is not possible-in fact, the larger code base means that the number of methods with identical names is most likely increased, making programs even harder to crack than before.

Conclusion

Assembly linking can be a crucial part of any application consisting of multiple assemblies. Combined with the other features of Dotfuscator Professional, assembly linking can provide demonstrable benefits for your .NET application-increasing security and reliability while decreasing size. If your executable relies on .NET assemblies, assembly linking is fundamental to protect your application against reverse engineers and hackers and to package your application efficiently.

 
 

sign up for newsletter

Have PreEmptive Contact Me