Open msschl opened 5 years ago
@glennc
Related https://github.com/dotnet/wpf/issues/499
It might make sense to move this discussion to dotnet/wpf
https://github.com/dapplo/Dapplo.Microsoft.Extensions.Hosting has some good examples of implementing custom lifetime extensions for things like WPF and WinForms.
As part of the migration of components from dotnet/extensions to dotnet/runtime (https://github.com/aspnet/Announcements/issues/411) we will be bulk closing some of the older issues. If you are still interested in having this issue addressed, just comment and the issue will be automatically reactivated (even if you aren't the author). When you do that, I'll page the team to come take a look. If you've moved on or workaround the issue and no longer need this change, just ignore this and the issue will be closed in 7 days.
If you know that the issue affects a package that has moved to a different repo, please consider re-opening the issue in that repo. If you're unsure, that's OK, someone from the team can help!
I'm going to unstale this and move it to the runtime since we already have one for WinForms and Xamarin :). As with those, this may be something that needs to live with the WPF team, but for now we can track it.
Paging @dotnet/extensions-migration ! This issue has been revived from staleness. Please take a look and route to the appropriate repository.
I couldn't figure out the best area label to add to this issue. Please help me learn by adding exactly one area label.
A good example at https://marcominerva.wordpress.com/2019/11/07/update-on-using-hostbuilder-dependency-injection-and-service-provider-with-net-core-3-0-wpf-applications/ (disclaimer: I am not the author, nor am I affiliated with the author in any way).
Is your feature request related to a problem?
I'm am trying out the latest .net core 3.0 preview. I want to build a wpf application that uses the generic host, so I can get some of the aspnet core magic in wpf, like e.g. DI. Is there a sample on how to get startet on this topic, especially with focus on the application lifetime management (something like UseConsoleLifetime)?
Describe the solution you'd like
A sample would be nice. Or an extension method like .UseApplicationLifetime(); on the hostbuilder.