Skip to content

Conversation

@tele-bird
Copy link

Hi, Gerald. This PR simply makes the iOS and Android apps run under .NET 8. I wanted to check whether .NET 8 would break the injection of your MainPage into the App constructor, but it didn't. I'm getting the same behavior as this SO post that you replied to: https://stackoverflow.com/questions/72429297/injecting-services-into-view-models-in-net-maui-app. I will now reply to your comment there. I'm getting the same problem as poster did, and I'm hoping you can help me. My .NET 8 project where it happens is in my branch here: https://github.com/tele-bird/mauipoc/tree/inject-appshell-into-app-constructor

@tele-bird
Copy link
Author

tele-bird commented Jul 31, 2024

I was unable to comment on your answer to the SO post because I don't have a 50 reputation, but I found this open issue that explains my problem. dotnet/maui#11485. I applied the workaround (add IServiceProvider into the App constructor) successfully. However, I notice that your project here doesn't need the workaround - it runs fine without it!... and I wonder why... ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant