Reputation: 51
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.
Upvotes: 1
Views: 1479
Reputation: 51
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();
Upvotes: 4