diff --git a/src/Maui/Prism.Maui/PrismAppBuilderExtensions.cs b/src/Maui/Prism.Maui/PrismAppBuilderExtensions.cs index 5e9f4287c..0415ae580 100644 --- a/src/Maui/Prism.Maui/PrismAppBuilderExtensions.cs +++ b/src/Maui/Prism.Maui/PrismAppBuilderExtensions.cs @@ -47,10 +47,12 @@ public static PrismAppBuilder ConfigureModuleCatalog(this PrismAppBuilder builde { if (!s_didRegisterModules) { - var services = builder.MauiBuilder.Services; - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); + builder.RegisterTypes(container => + { + container.TryRegisterSingleton(); + container.TryRegisterSingleton(); + container.TryRegisterSingleton(); + }); } s_didRegisterModules = true;