Skip to content

Instantly share code, notes, and snippets.

View Montago's full-sized avatar

Martin Kirk Montago

  • Auto IT
  • Capital area of Denmark
View GitHub Profile
@sajidmohammed88
sajidmohammed88 / DI WPF-C#.md
Last active April 13, 2024 20:40
Dependency injection in WPF project with .net core

Dependency injection in WPF project with .net core

Delete StartupUri="MainWindow.xaml" from App.xaml
Install packages :
Microsoft.Extensions.Configuration.Json
Microsoft.Extensions.DependencyInjection
Microsoft.Extensions.Options.ConfigurationExtensions
Add the file appsettings.json in the root of the project to use it for configuration.