1

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.

netcoreapp2.1

1 Answer 1

4

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(); 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.