I’m currently doing some work on a silverlight LOB application i wrote for a customer..
When i deploy i can’t help noticing how big the xap file is (4mb) and considering it’s not a massive app it seems a little unusual.
I am using the telerik silverlight toolkit (but only including the required themes – 2 I think)..
There’s about 1mb of images (which is maybe a bit too much for a LOB app)..
Is this average for a silverlight application?
Whats the average size of your xap files?
How would I go about “minifying” or compressing my xap file?
If you open the .xap file with an archive reader like 7-Zip, or rename it to .zip and open it, you can get an idea of where the size is coming from.
You can cut down on the size of the file by removing any References that aren’t used. If you’re not sure if something is used or not, remove it and see if the app still builds. If not, put it back in.
In your Silverlight project’s Properties, in the Silverlight section, you can check the “Reduce XAP size by using application library caching” checkbox to have it move some of the DLLs out to separate .zip files instead of being included in the XAP. That way, if your app changes, your users don’t have to download all of the included DLLs again.
If it’s still too large for your tastes, you might want to look at moving the images out of the .xap file.