Compartir a través de


Container Tools launch settings

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

In the Properties folder in an ASP.NET Core project, you can find the launchSettings.json file, which contains settings that control how your web app is started on your development machine. For detailed information on how this file is used in ASP.NET development, see Use multiple environments in ASP.NET Core. In launchSettings.json, the settings in the Docker section are related to how Visual Studio handles containerized apps.

    "Docker": {
      "commandName": "Docker",
      "launchBrowser": true,
      "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}"
    }

The commandName setting identifies that this section applies to Container Tools. The following table shows the properties that can be set in this section:

Setting name Version Example Description
launchBrowser Visual Studio 2017 "launchBrowser": true Indicates whether to launch the browser after successfully launching the project.
launchUrl Visual Studio 2017 "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}" This URL is used when launching the browser. Supported replacement tokens for this string are:

- {Scheme} - Replaced with either "http" or "https" depending on whether SSL is used.

- {ServiceHost} - Usually replaced with "localhost". When targeting Windows containers on Windows 10 RS3 or older, though, it is replaced with the container's IP.

{ServicePort} - Usually replaced with either sslPort or httpPort, depending on whether SSL is used. When targeting Windows containers on Windows 10 RS3 or older, though, it is replaced with either "443" or "80", depending on whether SSL is used.

Next steps

Configure your project by setting the Container Tools build properties.

See also