Skip to content
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

Generic host WPF-Application lifetime #36085

Open
msschl opened this issue Apr 19, 2019 · 8 comments
Open

Generic host WPF-Application lifetime #36085

msschl opened this issue Apr 19, 2019 · 8 comments

Comments

@msschl
Copy link

msschl commented Apr 19, 2019

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.

@Tratcher
Copy link
Member

@glennc

@analogrelay
Copy link
Contributor

analogrelay commented Apr 25, 2019

Related dotnet/wpf#499

It might make sense to move this discussion to dotnet/wpf

@EdinaLewis
Copy link

https://github.com/dapplo/Dapplo.Microsoft.Extensions.Hosting has some good examples of implementing custom lifetime extensions for things like WPF and WinForms.

@ghost
Copy link

ghost commented May 8, 2020

As part of the migration of components from dotnet/extensions to dotnet/runtime (aspnet/Announcements#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!

@analogrelay
Copy link
Contributor

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.

@ghost
Copy link

ghost commented May 8, 2020

Paging @dotnet/extensions-migration ! This issue has been revived from staleness. Please take a look and route to the appropriate repository.

@analogrelay analogrelay transferred this issue from dotnet/extensions May 8, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. Please help me learn by adding exactly one area label.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label May 8, 2020
@analogrelay analogrelay added this to the Future milestone May 8, 2020
@ericstj ericstj removed the untriaged New issue has not been triaged by the area owner label Jun 22, 2020
@maryamariyan maryamariyan added this to Uncommitted in ML, Extensions, Globalization, etc, POD. via automation Oct 8, 2020
@maryamariyan maryamariyan moved this from Uncommitted to Future in ML, Extensions, Globalization, etc, POD. Feb 3, 2021
@IanKemp
Copy link

IanKemp commented Mar 16, 2021

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).

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

No branches or pull requests

8 participants