What are all the Ways to Reduce to XAP file size?
I just found the way of enabling the Application Library Caching but there is some drawbacks also.
Is there any other way to reduce the file size ?
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Suthish NairRank #92 · 22.8K reputationPosted Jul 4, 2011, 5:15 AM EDT
I didn't tried these things..
But you still refer links, might you already gone through it..
Or, wait for more replies..
Link1 Link2 Link3
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jul 4, 2011, 5:36 AM EDT
The Links given by Suthish may help you.. Try that..
C# Corner56 reputationPosted Jul 7, 2011, 2:22 AM EDT
Basic Structure of Xap file is,
Step 1>
Rename your Xap file to ZIP and then Extract that file.You will get size of your application Dll,other
Assemblies. Please see attached file
Step 2>
Use Application Library Caching. Right click on your project,in property window you will get checkbox,
Reduce XAP size by using application library caching, just make check sign, by doing all assemblies will be stored in separate ZIP files. Please see attached file.
Manikavelu VelayuthamRank #413 · 6K reputationPosted Jul 7, 2011, 2:36 AM EDT
Now the referenced dlls are stored in seperate ZIP files.
At the time of initial load, those zip files are not downloaded, only the XAP file is downloaded.
All other referenced dlls are downloaded on deman basis, I mean when the dll referenced page is opened.
I need to know is there any drawbacks or any limitation by doing this default.
Because this option is not enabled by default.
If this could reduce the XAP file and fast the initial load, they could have enabled this option by default.
My question is very simple
-------------------------
When to Enable this option and When to Disable this option and Whats the Pros and Cons in both the option ?
C# Corner56 reputationPosted Jul 8, 2011, 2:12 AM EDT
http://www.infoq.com/resource/articles/silverlight-4-in-action/en/resources/Silverlight4inActionCH03.pdf
please check this link of pdf,I hope it will give answer of your quesion.
It explains that, if we want to avoid packaging of common application DLLs into every Application.XAP i.e "assembly cashing" then select the "Reduce XAP size by using Application Library Cashing" option on the project silverlight property page.
plz check the article on above link.
Thank You.
Manikavelu VelayuthamRank #413 · 6K reputationPosted Jul 8, 2011, 2:35 AM EDT
Thats an excellent PDF.
I have already implemented it in my project. Bu have read the following disadvantages in enabling it.
Where there are multiple XAPs sharing the same set of library zips there is a danger of "DLL Hell". Potentially someone can update a XAP which uses newer versions of libraries that the other XAPS have not been tested with and inadvertently break all the other XAPS. There are good practices that can eliminate this problem but it takes a little more effort than flicking on the Checkbox.
Thats why still thinking of it to Enable it or to find other Good Practices that eliminates it.
Anyway that PDF is good one.
Thanks Pravin