XAPModuleTypeLoad and ExternalParts

Topics: Prism v2 - Silverlight 3
Jan 21, 2010 at 3:01 PM

When i am using "Reduce XAP Size" on some Modules (both referencing third party assemblies with extmap.xml) the referenced assemblies were outsourced to .zip. But when prism now downloads these modules via XAPModuleTypeLoader these external parts were ignored and my module raises an exception (type xyz not found).

How have a moduletypeloader to be written, that loads the external parts but only when needed?? Is there a simple way or should i wrote a ModuleTypeLoader that caches infos about downloaded external parts?

Please help.

Jan 26, 2010 at 12:55 PM

Hi,

As you said, when you use Application Library Caching, the cached assemblies are removed from the .xap file and placed in a separate .zip file (as the link provided before explains). As the XapModuleTypeLoader only gets the assemblies present in the .xap files (check the GetParts method), only the assemblies you place in them will be loaded.

Creating a type loader that checks whether the external parts have already been downloaded and download them if they haven’t would be a good approach (and also a useful contribution to the community).

One of the other things you could use to reduce the size of .xap files is explained in this article.

Remember that Prism 2.0 was created targeting Silverlight 2.0, and then refreshed for 3.0 due to very few high priority bugs. The feature you are talking about is newer than 2.0, so make sure to create an item in the Issue Tracker, so other people can vote for it. The team will take these suggestions into account for the future versions of Prism.

Please let me know if this helps.

Damian Schenkelman
http://blogs.southworks.net/dschenkelman

Jan 26, 2010 at 7:27 PM

Hi,

i have written such a typeloader that is loading extension parts. If it is interesting for the community i can post or mail the code and perhaps a working sample.


Greets, Peter

Feb 6, 2010 at 9:58 AM

Hmm, i have a small zip-file with my small prism.extensions.modularity implementation which can load external parts. but how can i post it here?

Feb 10, 2010 at 11:30 PM

Hi Peter,

There is no specific way to post the sample solution in this site. Some possibilities to share this with the community are:

Please let me know if this helps.

Damian Schenkelman 
http://blogs.southworks.net/dschenkelman

Mar 10, 2010 at 6:40 AM

Hi, i make a Skydrive-Account.

Now i uploaded the sources there. I hope that works....

http://cid-ff64b0f49e2a717a.skydrive.live.com/browse.aspx/.Public

Peter

Jul 28, 2010 at 2:37 PM
petat wrote:

Hi, i make a Skydrive-Account.

Now i uploaded the sources there. I hope that works....

http://cid-ff64b0f49e2a717a.skydrive.live.com/browse.aspx/.Public

Peter

Hi Peter

It doesn't seemed to be there.  Could you upload this again?

Thanks

Kevin

 

Jul 28, 2010 at 6:53 PM

You may want to talk to the coordinators of the Prism Contrib project as a place to make this publically available.

 http://compositewpfcontrib.codeplex.com/

It is a project run by the community to develop additions to Prism and take contributions. 

Good luck,

Michael Puleio