0
votes

I am developing application for WPF and Silverlight by ProjectLinker with PRISM and MEF modularity. My modules are Class Library (in WPF) and Silverlight Class Library (in Silverlight). Now I want to load modules in WPF or Silverlight by Catalog.xaml from server.

Problem is: - Silverlight cannot load DLL but only XAP - WPF cannot load XAP but only DLL

How can I do that - developing by project linker (same code for both platforms), create modules, download from server and load to application?

I have in bootstrapper: On server WCF I have Catalog.xaml - I download it and... catalog = Microsoft.Practices.Prism.Modularity.ModuleCatalog.CreateFromXaml(stream); - it works But If I run application by the load module I have an error (I tried to load DLL to Silverlight).

Thanks

2

2 Answers

0
votes

Try this link from the PRISM website: Sharing Code Between Silverlight and WPF

For the Module catalogs, you will either need to create separate XAML files, or use possibly use TT files to generate them from a common set of module names.

As you need to carefully specify the dependencies for Silverlight to get the best start times, you might be better off maintaining separate files.

0
votes

Problem was on type of project. Project for silverlight must be as Silverlight application. So I changed type of silverlight project and now build for WPF is DLL and for silverlight is XAP. It is working.