Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

launchSettings.json commandName usage

Everytime I find some launchSettings.json files, they have the following structure:

{
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:40088/",
      "sslPort": 0
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "IIS Express (Staging)": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Staging"
      }
    }
  }
}

found here.

However, I can't find any document about the attribute commandName.

What is the usage of commandName?

like image 976
Moritz Schmidt Avatar asked Jun 20 '17 06:06

Moritz Schmidt


People also ask

What is launchSettings JSON used for?

The launchSettings. json file is used to store the configuration information, which describes how to start the ASP.NET Core application, using Visual Studio. The file is used only during the development of the application using Visual Studio. It contains only those settings that required to run the application.

Is launchSettings JSON used in production?

Visual studio maintains a file called launchSettings. json in a folder called Properties. This file contains various options for launching your app. launchSettings is used only by visual studio - it is never deployed to a production server.

Do I need launchSettings JSON?

Don't need launchSettings. json for publishing an app. If there are settings that your application needs to use, please store them in appsettings. json .

Is launchSettings JSON used in Docker?

In launchSettings. json, the settings in the Docker section are related to how Visual Studio handles containerized apps. These command-line arguments for starting your app are used when launching your project in the container. Additional arguments to pass to the docker run command.


1 Answers

The command name maps to how the project should be started. Visual Studio uses this to run your project.

  • IISExpress obviously indicates that IIS Express is used to start the project.
  • Project indicates that the project is executed with the .NET CLI directly on the command line.

command names

like image 143
Henk Mollema Avatar answered Sep 24 '22 23:09

Henk Mollema