liveBook · Manning

Appsettings.Development.json

As explained in ASP.NET Core in Action, 3e

appsettings.Development.json is an ASP.NET Core environment-specific application configuration file containing settings for the Development environment.

appsettings.Development.json is an optional JSON configuration file for an ASP.NET Core app’s Development environment. It sits beside appsettings.json and supplies runtime settings for local development. section 3.4 section 10.4.2

The configuration system uses the file as an environment-specific layer:

  • Loads appsettings.json first, then loads the optional file whose name matches the current environment. section 10.4.2
  • Overrides values from appsettings.json when both files contain the same key. section 10.4.2
  • Supports development-only behavior such as more verbose logging, while staging and production can use their own environment-specific files. section 10.4.2
  • Can be combined with development-only providers such as User Secrets instead of placing sensitive values in the JSON file. section 10.4.2

How the file is selected

WebApplicationBuilder uses the current EnvironmentName to add an optional file such as appsettings.Development.json after appsettings.json. A custom setup can make the base file compulsory and the environment-specific file optional.

Figure 3.7 Solution Explorer and folder on disk for a new ASP.NET Core application. Solution Explorer also displays the Connected Services and Dependencies nodes, which list NuGet and other dependencies, though the folders themselves don’t exist on disk.
CH03_F07_Lock3

Use the project-layout figure to locate appsettings.json and appsettings.Development.json in the project root. section 3.4

How ASP.NET Core in Action, 3e covers it

How deep it goes
Explains file location, optional loading, precedence, and environment selection, but does not detail JSON schema or individual setting types.
Examples
Uses appsettings.Development.json, appsettings.Staging.json, appsettings.Production.json, verbose logging, and conditional User Secrets.
What it assumes
Assumes a basic ASP.NET Core project and introduces project configuration files and environment-based loading.
What you can do after
Operate/configure environment-specific ASP.NET Core settings and understand which values override shared configuration.
How it connects
Connects environment-specific configuration with appsettings.json, WebApplicationBuilder, EnvironmentName, logging, and User Secrets.

Also explained in

Compare how 3 books explain appsettings.Development.json →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.