Prism - Upgrading Prism 2 to Prism 4 RRS feed

  • Question

  • We´ve upgraded our Silverlight 5 application to Prims 4.

    We have taken the following steps:

    1. Remove all references to Microsoft.Practices.Composite(Microsoft.Practices.Composite, Microsoft.Practices.Composite.Presentation, Microsoft.Practices.Composite.UnityExtensions)

    2. Replaced the references above with (Microsoft.Practices.Prism, Microsoft.Practices.Prism.Interactivity)

    For some reason the Silverlight project that host the solution requires a refernce to Microsoft.Practices.Unity.Silverlight. After adding this, the solution builds.

    When we run the application we get the following error message:

    "The current type, Microsoft.Practices.Prism.Regions.IRegionBehaviorFactory, is an interface and cannot be constructed. Are you missing a type mapping?"

    We never actually changed the code that handles the bootstrapping. Is there a change in the implementation between Prism2/composite and Prism 4?


    Thursday, December 13, 2012 11:21 AM


All replies

  • Give a try to add the reference of the following also -

    • Microsoft.Practices.Prism.UnityExtensions
    • Microsoft.Practices.ServiceLocation

    Also, You will have to chage the Namespace Microsoft.Practices.Prism.* throught your application.

    Dhananjay(Tech Lead). Please mark the reply as answers if it helps.

    Thursday, December 13, 2012 3:49 PM
  • Hi CodeHopper,

    This following article describes how to upgrade a solution from version 2.0 to version 4.0 of the Prism Library and the major changes that you should be aware of if you are considering upgrading to the 4.0 version. Please try to refer to: http://msdn.microsoft.com/en-us/library/gg430859(v=pandp.40).aspx .

    Amy Peng

    Amy Peng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Sunday, December 16, 2012 8:42 AM
  • Thnx! Eventually, it worked out fine. We had to change a lot of references, but the only bit of code we had to change was the following:

    protected override IModuleCatalog GetModuleCatalog => protected override IModuleCatalog CreateModuleCatalog

    Thank you, for your input! Regards /C

    Friday, December 21, 2012 7:22 AM