Rick Strahl, first and foremost I want to thank you for your blog and your openness to share your knowledge and I have always wanted to work in Hawaii.
Per your blog post - https://weblog.west-wind.com/posts/2016/May/23/Strongly-Typed-Configuration-Settings-in-ASPNET-Core
I have a project which does not require a startup however, it does have an appsettings.json that I add because you need configuration data.
Following your article, where do you propose putting the following code -
Startup(IHostingEnvironment env)
{
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
.AddEnvironmentVariables();
Configuration = builder.Build();
}
Also since this is not really an MVC application but rather a class library would I need to add services.AddMvc();
Mahalo
If you're not using startup none of that works because it gets added to the dependency injection system. I think you can build the configuration provider independently but you just get the raw Configuration object, not the strongly typed functionality.
+++ Rick ---