Skip to content

How can I load appsettings.Development.json? #1298

@petro2050

Description

@petro2050

In the constructor of Startup.cs, I injected an IWebHostEnvironment and noticed the environment is set to Production. This happens in debug mode. As a result, I'm unable to load appsettings.Development.json. I'm not sure if this is an issue on your end or .NET 6 / VS2022.

In ConfigureServices, I need to configure services based on the environment (for example use local DynamoDb in Development).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions