I'm using strongly typed settings in my .NET 6 Project.
I'm binding the appSettings via Hostbuilder's
.ConfigureServices((hostContext, services) =>
{
services.Configure<Settings.Settings>(hostContext.Configuration.GetSection(Settings.Settings.SectionName));
I am looking for a way to automatically generate either:
- The Json section in appsettings.json (or any other json) from my Settings.cs File or
- The Settings.cs from a json section.
Is there any way I could do this ? Or any other way that is smarter than copy-pasting the Settings.cs' Properties into the Json and editing ?