BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Looking inside Silverlight XAP Files, and Making Them Smaller

| by Jonathan Allen on Mar 04, 2009. Estimated reading time: less than one minute |

The unit of deployment in Silverlight is a XAP file. This file contains the manifest and all of the code necessary to run a Silverlight application. The file format itself is nothing special, it is just a ZIP file with a different name. Inside it you can find an AppManifest.xaml file and any necessary DLLs.

Unfortunately, the included DLLs often contain a lot of unnecessary code. If your application only needs a small part of a library, your download size could be unnecessary large. Rather than using a new project file for each application, you can remove the unused classes after the fact using XapOptimizer.

XapOptimizer, currently in beta, is an online tool from ComponentOne. You can upload XAP files, which are purged of unnecessary code and then emailed back to you. For the purpose of this article I grabbed a couple of random XAP files I had in my web browser cache and got back an average reduction of 27%. Checking with Reflector, it did in fact strip out several types from the DLLs.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and dont miss out on content that matters to you

BT