Click here to Skip to main content
13,348,514 members (93,849 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


3 bookmarked
Posted 16 Sep 2010

Obfuscating Silverlight

, 16 Sep 2010
Rate this:
Please Sign up or sign in to vote.
Obfuscating Silverlight

“Obfuscation is the concealment of intended meaning in communication, making communication confusing, intentionally ambiguous, and more difficult to interpret.”

Obfuscation has been used in programming for ages helping protect intellectual property! WPF and Silverlight is a little more tricky to obfuscate because of the way XAML work! While searching for a solution, I found that Dotfuscator does support Silverlight XAML & WPF BAML obfuscation.

“With XAML Obfuscation, developers can protect Intellectual Property and prevent tampering by renaming XAML resources, trim and compress Silverlight assemblies to optimize load time and performance, and automatically re-sign assemblies. Developers can fully obfuscate and instrument Silverlight XAP files resulting in a streamlined automated build process.”

WARNING: Dotfuscator is NOT a FREE tool

Let's try it out! What I have done is created an extremely simple Silverlight application. Next, I opened Dotfuscator and added my XAP to the project and obfuscated it (I left all the settings on their defaults) and compared the 2 XAPs.

The original XAP is 3,730 bytes and the obfuscated XAP is 4,134 bytes… Let's open it with reflector and compare.

Here is the MainPage un-obfuscated:

And here is the same page obfuscated:

Here is the un-obfuscated XAML:

And here is the same XAML obfuscated:

Dotfuscator has hundreds of settings to control the way it obfuscates code… so play with the settings and let me know what you think!

PS. Dotfuscator is not the only tool that has some XAML support… If you find any other that you like, please let me know!!!


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

South Africa South Africa
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralMy vote of 5 Pin
Member 160649019-Dec-12 1:44
memberMember 160649019-Dec-12 1:44 
GeneralMy vote of 1 Pin
redcheek23-Sep-10 17:24
memberredcheek23-Sep-10 17:24 
GeneralMy vote of 1 Pin
S.H.Bouwhuis20-Sep-10 23:23
memberS.H.Bouwhuis20-Sep-10 23:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.180111.1 | Last Updated 16 Sep 2010
Article Copyright 2010 by rudigrobler
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid