In the .net framework, we've used to use either web.config or app.config with ConfigurationManager or WebConfigurationManager to read the configuration sections.
2 items stood out:
a) standard configuration file (XML) was loaded by framework. So when you call ConfigurationManager from ANY DLL in your application assemblies you get the section or appSettings that routed through Application Domain.
b) There was ability to have protected sections, i.e. you put some open text data and when application runs, this data will be encrypted.
Now, in .net 6 we have plenty of talk about new configuration manager -Microsoft.Extensions.Configuration.ConfigurationManager.
At first .net core came without it but Microsoft soon added back System.Configuration.ConfigurationManager, now available for net6.0 and netstandard2.0
I have found ZERO information on how to use Microsoft.Extensions.Configuration.ConfigurationManager directly from a class library. It is all seem to be designed for endpoint application, the executing assembly.
I seem understand that if you really want something like this, there are ways of doing it but all of it seem to be overly convoluted and directly related to ASP.NET CORE. And in the end, does not solve the main issue - how to deal with these protected configs from a DLL. For example, in my architecture, the EF stuff is located 2 levels down from the endpoint app. I don't want to pass connection string down below. I want my EF layer to be able by itself find encrypted connection, independently, if it is invoked from a console app, test project or Win Forms.
Are there any guidance to all these things outside the usual - "we now have this class in asp.net core"??