This is a migrated thread and some comments may be shown as answers.

Reducing XAP Size by using application library caching

6 Answers 245 Views
Telerik Minifier
This is a migrated thread and some comments may be shown as answers.
eraashishgupta
Top achievements
Rank 1
eraashishgupta asked on 16 Feb 2011, 04:04 PM
Hi all,
I have one question i was trying to use the feature of silverlight whihc is reduce xap file size by using application library caching, 
i have two systems one one i had telerik installed and on another i didnt had telerik installed.
When i build the solution on the system having telerik installed everything worked like charm , but when i build up on the system which dont have telerik installed the xap size grew very large as it inlcluded all the telerik dlls inside it.

So ideally this should not happen i then tried everything zipping down individual dlls and altering the appManifest.xaml file and adding external part but nothing works.

So is how to use application library caching on a system where we dont have telerik installed.
Same rule applies for any other third party assembly.

One solution which is obvious and comes to mind is install the third party assembly files in the global assembly cache that too i tried but its of no help

Can you sugggest me any solution to this problem.

Thanks,
Aashish Gupta
www.smallworkarounds.net

6 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 21 Feb 2011, 05:23 PM
Hello eraashishgupta,

In order to take advantage of the application library chaching, you need to add the assemblies accompanied by a valid assemblyShortName.extmap.xml mapping files.Those files configure the assemblies for use with application library caching. You can read more here.

If you open the binaries from your installation folder, you will notice that each dll file is accompanied by a mapping file and therefore you can reduce the size of your XAP. However, when you try to build your application on a machine where you only copy the dll files, the assemblies cannot be properly configured and you cannot use the application library caching.

Can you please copy the .extmap.xml files along with the dll files to the machine with no Telerik installation and build your solution and let us know if the size of the XAP is properly reduced?

Also, you can have a look at this blog post that might also help.

Regards,
Tina Stancheva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Muneswar Rao Gali
Top achievements
Rank 1
answered on 24 Apr 2012, 01:54 PM
How can I redirect my silverlight application to load newer version of telerik dlls without building my code? Basically my requirement is below:
My silverlight app is referring 3rd party silverlight dll of V1.0.0.0 and I want my app to load this 3rd party dll dynamically. I can do this as you explained in this article. Is it possible to load V2.0.0.0 of 3rd party dll without rebuilding my app. If yes, can you please route me to a proper link that explains how?
0
Tina Stancheva
Telerik team
answered on 26 Apr 2012, 07:50 AM
Hello Muneswar,

We believe that in your case it would be better to take advantage of the Managed Extensibility Framework introduced in the .NET Framework 4. MEF is a library for creating lightweight, extensible applications. It allows application developers to discover and use extensions with no configuration required. It also lets extension developers easily encapsulate code and avoid fragile hard dependencies. MEF not only allows extensions to be reused within applications, but across applications as well.

You can find more info about it here.

Greetings,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Marcel
Top achievements
Rank 1
answered on 13 Aug 2013, 08:12 PM

  • I have a silverlight control which uses Telerik controls, hosted in a custom silverlight web part in SharePoint 2010. It works well until I try to reduce the XAP file size. Then the silverlight control does not appear in the web part.


    I followed the instructions at: http://msdn.microsoft.com/en-us/library/dd833069(v=vs.95).aspx steps 1-4 of 'To enable application library caching'. I did not perform the additional steps in 'To configure an assembly for use with application library caching' since I believe this is already done for my Telerik dlls.


    I am not sure what I am doing wrong. I see the new *.zip files in the bin folder of the silverlight app and I see the xap file has been reduced in size, but the Silverlight control does not appear in the SharePoint web part.


    I even tried copying the *.extmap.xml files from the telerik install location to the bin directory of my silverlight project and of my SharePoint project. This made no difference.


    Running in the VS debugger does not trap any error and the breakpoints do not set in silverlight (no symbols have been loaded for this document), even after a full rebuild. (This normally works with the option 'Reduce XAP size ..' unchecked). Where can I find the error? My silverlight unhandled exception handler is not being invoked and I suspect that the silverlight control is not even loading.


    What am I missing?  Thank you for any help.



0
Tina Stancheva
Telerik team
answered on 16 Aug 2013, 03:22 PM
Hello Marcel,

I'm not sure what might be going wrong in your application exactly. However when you build a Silverlight solution with enabled assembly caching, the build packages the assemblies into separate zip files and generates an ExtensionPart element in the application manifest. So can you please make sure that all required zip files are saved along with the XAP of the application in the same location?

If you place the XAP file in a SharePoint library, please add all zip files created by the assembly caching in the same location so that your project can find and download them properly.

Another thing you can check is whether you're using the NoXaml Telerik assemblies. These assemblies do not contain any xaml and therefore they don't provide any built-in ControlTemplates for the Telerik controls. And that might be the reason why you can't see anything in the WebPart.

I hope this information can help you locate the cause for the issue.

Regards,
Tina Stancheva
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Marcel
Top achievements
Rank 1
answered on 16 Aug 2013, 04:07 PM
Hi Tina,

Thank you for your reply it helped me resolve the issue. I have posted the solution here .
Tags
Telerik Minifier
Asked by
eraashishgupta
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Muneswar Rao Gali
Top achievements
Rank 1
Marcel
Top achievements
Rank 1
Share this question
or