Dependency Injection: Attempted to access a missing method #9298
Labels
area-core-hosting
Extensions / Hosting / AppBuilder / Startup
platform/windows 🪟
s/triaged
Issue has been reviewed
s/try-latest-version
Please try to reproduce the potential issue on the latest public version
t/bug
Something isn't working
Milestone
Description
Page need need no parameter Constructor to work normally.
Steps to Reproduce
MauiProgram.cs
AppShell.xaml
MyService.cs
NewPage.cs
Launch App and switch to World Tab
UnhandledException in App.g.i.cs MauiLab.WinUI.App.InitializeComponent()
sender
object {MauiLab.WinUI.App}
My debugger can't catch exception if app's first page's constructor need service injection.
Version with bug
6.0.400
Last version that worked well
Unknown/Other
Affected platforms
Windows, I was not able test on other platforms
Affected platform versions
Windows 11 22622.436 with Visual Studio 17.3/17.4 Preview 1
Did you find any workaround?
Register page manually just like preview 13 announcing blog post
add
builder.Services.AddTransient<NewPage>();
Relevant log output
No response
The text was updated successfully, but these errors were encountered: