Alternative hosting approach order is incorrect
- Dominant language
- No language data
- Stars
- 4.8k
- Forks
- 6.1k
- Avg merge
- 19h 10m
- Merged PRs (30d)
- 268
Description
### Type of issue
Code doesn't work
### Description
In the list described by the paragraph starting with
The [Host.CreateApplicationBuilder(String[])](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.hosting.host.createapplicationbuilder#microsoft-extensions-hosting-host-createapplicationbuilder(system-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](https://github.com/dotnet/docs/issues?q=is%3Aissue+is%3Aopen+0d5de37c-8f89-b6a5-3132-2c5214196bfd)
Contributor guide
Assessment
This issue has not been assessed yet.