首页 > 解决方案 > Is launchsettings.json in a dotnet core project used in production?

问题描述

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?

标签: c#asp.net-core.net-core

解决方案


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.


推荐阅读