Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is launchsettings.json in a dotnet core project used in production?

Tags:

Is the launchsettings.json meant to be used in production or is it only for development purposes?

The one that is created by default has ASPNETCORE_ENVIRONMENT set to Development and also a localhost applicationUrl. Am I suppose to create separate production/staging profile or is this more of a development tool?

like image 575
Gustav Avatar asked Mar 22 '19 08:03

Gustav


People also ask

Where is launchSettings json used?

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.

How do I add launchSettings json to an existing project?

You can add/change them through launchsettings. json . Or you can right-click on the project and select Properties . Then you go under Debug tab and you will be able to change them.

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.

What are json files available in ASP.NET Core project?

json file used by NuGet is a subset of that found in ASP.NET Core projects. In ASP.NET Core project. json is used for project metadata, compilation information, and dependencies.


1 Answers

The launchSettings.json file is only used by Visual Studio during debugging and when running the app via dotnet run command.

See the quote from the official documentation:

The launchSettings.json file:

  • Is only used on the local development machine.
  • Is not deployed.
  • contains profile settings.

So for everyone who is looking for the short confirmed answer:

No, it's not used in production.

like image 124
Siarhei Kavaleuski Avatar answered Oct 21 '22 14:10

Siarhei Kavaleuski