CreateModuleCatalog() is called twice

Apr 3, 2012 at 8:19 AM

hello all
sorry but I am a beginner
congratulations for your work
Prism seems something exceptional
I'm doing some tests to better understand that this technology can
rehearsing the matter with me CreateModuleCatalog() is called twice
Is this normal?
What am I doing wrong?


The following code

Public Class BootStrapper : Inherits MefBootstrapper

    Protected Overrides Function CreateShell() As DependencyObject
        Return Me.Container.GetExportedValue(Of Shell)()
    End Function

    Protected Overrides Sub InitializeShell()
        Application.Current.RootVisual = CType(Me.Shell, UIElement)
    End Sub

    Protected Overrides Sub ConfigureAggregateCatalog()
        MyBase.AggregateCatalog.Catalogs.Add(New AssemblyCatalog(GetType(BootStrapper).Assembly))
    End Sub

    Protected Overrides Function CreateModuleCatalog() As IModuleCatalog
        Return _
            Microsoft.Practices.Prism.Modularity.ModuleCatalog.CreateFromXaml( _
                New Uri( _
                    "/TestLoad;component/ModulesCatalog.xaml", _
    End Function
End Class


Apr 3, 2012 at 7:47 PM


So far we couldn't find anything wrong within the code snippet you provided.

Also we try debugging the Modularity QuickStart with MEF for Silverlight which can be found in the following site:

This QuickStart portrays a very similar implementation to the aforementioned bootstrapper, and we found that the CreateModuleCatalog was called only once.

Perhaps you could provide us with a little more information about your scenario so we can help your further.

Also if you are interested in the start-up process of a Prism application, I believe you could find the following chapter of the Prism documentation useful:


Agustin Adami

Apr 3, 2012 at 9:05 PM

thanks for your answer
at the end after several hours
I rewrote
and has begun to function properly
I think the problem was due to the fact that I did not know
that the references had to be set to false
and something was messed up
In fact, even setting it to false, however, the 'application did not work
Thanks for your guidance and your references