Software Development

A journal for sharing all things software development related

Where do launch settings originate

Thu, 04 Jul 2019 11:20 UTC by garethbrown

Note that VS 2019 has support for Docker compose, which overrides the below where that profile is selected.

VS 2019 Docker compose seems quite fragile.

VS 2017 only sees Docker files, which can be used with multiple startup projects.

Visual Studio 2017 and 2019 make different changes to launchSettings.json when adding Docker support


In VS 2019 they look like this:

"Docker": {
      "commandName": "Docker",
      "launchBrowser": true,
      "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
      "environmentVariables": {
        "ASPNETCORE_URLS": "https://+:443;http://+:80",
        "ASPNETCORE_HTTPS_PORT": "40200"
      "httpPort": 30200,
      "useSSL": true,
      "sslPort": 40200

In VS 2017 they look like this:

      "launchBrowser": true,
      "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"

Note that in VS 2017 the ASPNETCORE_ENVIRONMENT is included and will override environment arg in the ENTRYPOINT command, where as they are not specified in 2019.

ENTRYPOINT ["dotnet", "Example.WebApi.dll", "--environment=Development"]

Launch settings do not play any role in production environments.

With multiple start up projects selected in VS, the 'Docker' profile is not shown, but debugging is started in docker.

The information on this site is provided “AS IS” and without warranties of any kind either
express or implied. To the fullest extent permissible pursuant to applicable laws, the author disclaims all warranties, express or implied, including, but not limited to, implied warranties of merchantability, non-infringement and suitability for a particular purpose.

UI block loader
One moment please ...