Is there any support for appsetting.Development.json with AWS Mock Lambda Test Tool. Can I use appsetting.Development.json to load the application related setting while debugging lambdas locally. My lambdas are inside dot net core library project.
1 Answer
This can work even for dot net core class libraries.
new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: true)
.AddJsonFile($"appsettings.{Environment.GetEnvironmentVariable("Environment")}.json", optional: true)
.AddEnvironmentVariables()
.Build();