liveBook · Manning

launchSettings.json

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

launchSettings.json is an ASP.NET Core development configuration file that defines how an application is launched and debugged by development tools.

launchSettings.json is a development configuration file in the Properties folder. It controls how Visual Studio runs and debugs an ASP.NET Core application, while appsettings files control runtime behavior. section 3.4

The file defines launch profiles. Each profile can provide environment variables and other launch settings, allowing projects or profiles to use different local configurations without changing every application on the machine. section 10.4.3

Typical profiles provide different ways to start the application:

  • The http profile runs the project and listens only for HTTP requests. section 10.4.3
  • The https profile runs the project and listens for both HTTP and HTTPS requests. section 10.4.3
  • The IIS Express profile runs the application through IIS Express and is available only on Windows. section 10.4.3

Selecting a development environment

A profile can set the hosting environment to Development. Choose the profile from Visual Studio’s Debug drop-down menu, then start the application with that project-specific environment. section 10.4.3

Running without a launch profile

Use dotnet run --no-launch-profile --environment Staging to start without launchSettings.json profiles while explicitly selecting the Staging environment.

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

How deep it goes
Explains file placement, profiles, URLs, environments, and selection, but does not detail the complete JSON schema.
Examples
Uses http, https, and IIS Express profiles plus a dotnet run command that selects Staging without profiles.
What it assumes
Assumes an ASP.NET Core project and basic familiarity with Visual Studio or dotnet run.
What you can do after
Operate/configure Visual Studio or dotnet run with project-specific launch profiles and hosting environments.
How it connects
Connects ASP.NET Core hosting environments with Visual Studio, environment variables, dotnet run, and IIS Express.

Also explained in

Compare how 4 books explain launchSettings.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.