Prism Modularity & Silverlight 3 OOB

Topics: Prism v2 - Silverlight 3
Apr 1, 2010 at 5:11 AM
Edited Apr 1, 2010 at 5:16 AM


     I'm testing out a very simple prism app that is installed out of browser (OOB).   I'm finding that the modules seem to load very inconsistently and sometimes, apparently not at all.   Here is a screencast showing what's happening:

It's a pretty vanilla configuration:


protected override IModuleCatalog GetModuleCatalog()
            return ModuleCatalog.CreateFromXaml(
                        new Uri( "/PrismQuickStartSoution-Shell;component/ModuleCatalog.xaml",
                        UriKind.Relative ) );



...and the ModuleCatalog.xaml:


<prism:ModuleCatalog xmlns=""

    <prism:ModuleInfo Ref="PrismQuickStartSoution-Module1.xap"
                      ModuleType="Prism.Samples.Module1.ModuleInit, PrismQuickStartSoution-Module1, Version="

    <prism:ModuleInfo Ref="PrismQuickStartSoution-Module2.xap"
                      ModuleType="Prism.Samples.Module2.ModuleInit, PrismQuickStartSoution-Module2, Version="



Any idea what might be going on?



Apr 2, 2010 at 2:25 AM

I am not using the xml file for now. I add the modules in my code and use ModuleManager.Run() when I have all catalogs I need in the ModuleCatalog object.

Not sure if you did this already but try changing the InitializationMode to OnDemand and initialize modules once the shell is loaded. Its probably worth a shot.


Apr 5, 2010 at 6:29 PM

Hi James,

A possible reason for this to happen could be that the modules are loaded remotely and are in different .xap files, since .xap files that don’t appear in the main application aren’t added to the out-of-browser cache. Possible approaches to workaround this issue could be:

  • Creating a XapCachingModuleTypeLoader that will download to Isolated Storage and check there first for .xap files. After the files are cached the OOB application should be able to load the modules.
  • Including the modules in the main .xap.

Please let me know if this helps.

Damian Schenkelman

Apr 6, 2010 at 3:40 AM

Thanks Aditya and Damian!  I'll have to look into these.