Clarify Config Source Ordering Effects

Fixes #303
pull/771/head
Steve Smith 2015-12-09 08:03:34 -05:00
parent c90cdcb231
commit dab1d36839
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ Adding support for additional configuration file sources is accomplished through
:language: c# :language: c#
:lines: 14-17 :lines: 14-17
The order in which configuration sources are specified is important, as this establishes the precedence with which settings will be applied if they exist in multiple locations. In the example above, if the same setting exists in both *appsettings.json* and in an environment variable, the setting from the environment variable will be the one that is used. Essentially, the last configuration source specified "wins" if a setting exists in more than one location. The order in which configuration sources are specified is important, as this establishes the precedence with which settings will be applied if they exist in multiple locations. In the example above, if the same setting exists in both *appsettings.json* and in an environment variable, the setting from the environment variable will be the one that is used. The last configuration source specified "wins" if a setting exists in more than one location. The ASP.NET team recommends specifying environment variables last, so that the local environment can override anything set in deployed configuration files.
.. note:: To override nested keys through environment variables in shells that don't support ``:`` in variable names replace them with ``__`` (double underscore). .. note:: To override nested keys through environment variables in shells that don't support ``:`` in variable names replace them with ``__`` (double underscore).