Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding modules to Prism in newest PR version #1286

Closed
SirdarAPJ opened this issue Nov 27, 2017 · 3 comments
Closed

Adding modules to Prism in newest PR version #1286

SirdarAPJ opened this issue Nov 27, 2017 · 3 comments

Comments

@SirdarAPJ
Copy link

I recently upgraded the prism to its latest pre-release to take advantage of the newest navigation features. After the update I had to make the following changes in some namespaces:

\*using Microsoft.Practices.Unity; (excluded)*\
using Unity; --(added)
using Unity.Lifetime; --(added)

I would like to know, first of all, if this procedure is correct.

Additionally, the error "A duplicated module with name has already been added" has always occurred when I try to add the second module in the following code snippet:

        protected override void ConfigureModuleCatalog ()
        {
            base.ConfigureModuleCatalog ();

            ModuleCatalog.AddModule (new ModuleInfo (typeof (CoreModule)));
            ModuleCatalog.AddModule (new ModuleInfo (typeof (ServicServiceModule)));
            ModuleCatalog.AddModule (new ModuleInfo (typeof (SynchronizationModule));
        }

This code worked fine before the update.

Based on the above information, can you deduce what I am doing wrong?

Thanks!

  • Platform: Android
  • Prism version: 7.0.0.269-pre
  • Xamarin version: 4.6.0.295
  • Xamarin.Forms version: 2.5.0.91635
@brianlagunas brianlagunas added this to the Prism 7.0 milestone Nov 27, 2017
@brianlagunas
Copy link
Member

Yes, you must update the namespaces because the latest preview is using Unity v5. Unity introduced a number of breaking changes which included namespace name changes.

The second issue is actually a bug. For now use the following syntax to get around that issue:

ModuleCatalog.AddModule<CoreModule>();

@brianlagunas
Copy link
Member

fixed

@lock
Copy link

lock bot commented Jan 29, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants