-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Exception: Window already exists #645
Comments
What is the exception message? |
The error occurs under net8 regardless of which versions of DryIoC and DryIoc.Microsoft.DependencyInjection are used. ioCManager encapsulates DryIoC.IContainer and is registered in DryIoContainer itself. DryIoC: 5.4.3 Configuration: or Configuration this.Container = new Container(rules) When I call Populate (iocManager.Container.Populate(mauiAppBuilder.Services);) the exception is thrown. I have been working successfully with DryIoc, Xamarin, netStandard, AspNet.Core since 2019. The error occurs with net8 and Maui. No matter which platform (Windows Machine, Android, iOS) is used |
Thanks for the clarifying. Also in regard to the |
@ChristianM66 Hi, I want to suggest trying DryIoc v6.0.0-preview-07 and check if the issue is reproducible. |
@ChristianM66 any updates on the issue? |
Hello, I am using DryIoC in conjunction with IServiceColleciotn in net8 and Maui.
When merging DryIoC and IServiceCollection using IContainer.Populate the following exception is thrown .
Without DryIoC and the Populate call, the exception does not occur.
Many thanks for your help
StackTrace
at Microsoft.Maui.Controls.Window.Microsoft.Maui.IWindow.Created()
at Microsoft.Maui.LifecycleEvents.AppHostBuilderExtensions.<>c.b__2_0(Window window)
at Microsoft.Maui.Platform.ApplicationExtensions.<>c__DisplayClass1_0.b__1(OnWindowCreated del)
at Microsoft.Maui.LifecycleEvents.LifecycleEventServiceExtensions.InvokeLifecycleEvents[TDelegate](IServiceProvider services, Action`1 action)
at Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(Application platformApplication, IApplication application, OpenWindowRequest args)
at Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(Application platformApplication, IApplication application, LaunchActivatedEventArgs args)
at Microsoft.Maui.MauiWinUIApplication.OnLaunched(LaunchActivatedEventArgs args)
at Microsoft.UI.Xaml.Application.Microsoft.UI.Xaml.IApplicationOverrides.OnLaunched(LaunchActivatedEventArgs args)
at ABI.Microsoft.UI.Xaml.IApplicationOverrides.Do_Abi_OnLaunched_0(IntPtr thisPtr, IntPtr args)
The text was updated successfully, but these errors were encountered: