If you are building a WP7 application you really, really need to look into obfuscating your .xap prior to submission. For the time being PreEmptive is giving away a license of their Dotfuscator for WP7 usage. Running the tool via the UI is simple and easy, I want to obfuscate our .xap EVERY NIGHT via our build process.
The real good news for us is that PreEmptive has made this process very easy, check out the online docs for how. What I have done is wrapped this in a very simple Nant script to help everyone along.
Step 1 – Install Dotfuscator for WP7
Step 2 – Setup your Nant Script
Things to pay attention to in the script above (sorry it is an image, XML does not work too well in my blog)
- The path to dotfuscator may be different for you
- The name of your configuration file may be different. (note that I ran the UI to build the .config first)
- You may want to switch out the command line switches
Step 3 – Run the Nant script from the command line
c:\Path to Nant\Nant\nant.exe -buildfile:build.xml obfuscate.Mobile.xap
As you can see running Dotfuscator from the command line is cake and with this you can now obfuscate your .xap’s on your build server.
Till next time,
02-22-2011 1:27 PM