Skip to content

Alternative hosting approach order is incorrect #43781

@jrutley

Description

@jrutley

Type of issue

Code doesn't work

Description

In the list described by the paragraph starting with

The Host.CreateApplicationBuilder(String[]) method provides default configuration for the app in the following order, from highest to lowest priority:

    4. appsettings.json using the [JSON configuration provider](https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration-providers#file-configuration-provider).
    5. appsettings.Environment.json using the [JSON configuration provider](https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration-providers#file-configuration-provider). For example, appsettings.Production.json and appsettings.Development.json.

These two are in the wrong order. The environment json is higher priority over appsettings.json

Page URL

https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/extensions/configuration.md

Document Version Independent Id

0d5de37c-8f89-b6a5-3132-2c5214196bfd

Article author

@IEvangelist

Metadata

  • ID: b458a209-339d-e896-4e85-6d1c6a7aa1f9
  • Service: dotnet-fundamentals

Related Issues

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