Using appsettings.json in .NET Core Console Applications // The Code

Michael Perrenoud
Michael Perrenoud
6.1 هزار بار بازدید - 4 سال پیش - In this video we are
In this video we are going to cover the code that's required to use appsettings.json files in a .NET Core Console application and log them to the Console.  We're just going to focus on the code and not on environments.  The next video will add environments to the puzzle.  We are going to cover the most simplified logging setup as well as some custom JSON serialization.

Previous video in this series: Using appsettings.json in .NET Core C...
Next video in this series: Using appsettings.json in .NET Core C...

Dependencies
====================================================
Microsoft.Extensions.Logging.Configuration
Microsoft.Extensions.Logging.Console

Caveats
====================================================
Set appsettings.json to "Copy always".
Settings.ToString() is overriden for JSON serialization.

Links
====================================================
Source: https://github.com/consult-with-mike/...
4 سال پیش در تاریخ 1399/01/24 منتشر شده است.
6,122 بـار بازدید شده
... بیشتر