-
Notifications
You must be signed in to change notification settings - Fork 186
Open
Labels
π seQUESTeredLabel to indicate an item has been imported.Label to indicate an item has been imported.dotnet-desktop/svc
Description
The .NET Dependency Injection article covers how to handle the app host builder from a console app, but WPF and WinForms require special care.
Here are some blog posts that cover this topic:
WPF
- https://badecho.com/index.php/2025/10/25/wpf-with-generic-host/
- https://thecodebuzz.com/dependency-injection-wpf-generic-hostbuilder-net-core/
- https://laurentkempe.com/2019/09/03/WPF-and-dotnet-Generic-Host-with-dotnet-Core-3-0/
WinForms
- https://thecodebuzz.com/dependency-injection-net-core-windows-form-generic-hostbuilder/
- https://github.com/alex-oswald/WindowsFormsLifetime
- https://ryancortino.github.io/WinForms-Dotnet-8/
Note that WinForms has the app startup framework (for C#) that could be leveraged.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
π seQUESTeredLabel to indicate an item has been imported.Label to indicate an item has been imported.dotnet-desktop/svc
Type
Projects
Status
π Ready