简体   繁体   English

launchsettings.json 是否在生产中使用的 dotnet 核心项目中?

[英]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? launchsettings.json 是用于生产还是仅用于开发目的?

The one that is created by default has ASPNETCORE_ENVIRONMENT set to Development and also a localhost applicationUrl.默认情况下创建的一个将 ASPNETCORE_ENVIRONMENT 设置为 Development 以及一个 localhost applicationUrl。 Am I suppose to create separate production/staging profile or is this more of a development tool?我是想创建单独的生产/暂存配置文件还是这更像是一种开发工具?

The launchSettings.json file is only used by Visual Studio during debugging and when running the app via dotnet run command. launchSettings.json文件仅在调试期间和通过dotnet run命令运行应用程序时由 Visual Studio 使用。

See the quote from the official documentation :请参阅官方文档中的引用:

The launchSettings.json file: launchSettings.json 文件:

  • 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.不,它不在生产中使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Launchsettings.json 不是使用 dotnet new 创建的 - Launchsettings.json not created using dotnet new 您可以在 ASP.NET Core 项目中更改 launchSettings.json 的位置吗? - Can you change the location of launchSettings.json in an ASP.NET Core project? 来自 launchsettings.json 的环境变量正在测试中使用吗? - Environment variables from launchsettings.json are being used in tests? Visual Studio for Mac 忽略launchSettings.json - Visual Studio for Mac Ignoring launchSettings.json 在调试中为SSL配置launchSettings.json - ASP.NET Core / Visual Studio Code - Configure launchSettings.json for SSL in debug - ASP.NET Core / Visual Studio Code ASP.NET Core 2.2 如何在项目之间共享 web.config/launchSettings.json 文件 - ASP.NET Core 2.2 How to share web.config/launchSettings.json files among projects ASP.NET 核心 3.1:ConfigureAppConfiguration 是否与 launchSettings.json 交互? - ASP.NET core 3.1: does ConfigureAppConfiguration interacts with launchSettings.json? 微服务未在 LaunchSettings.JSON 设置的端口上启动 - Microservice not Launching on Port Set by LaunchSettings.JSON launchSettings.json 文件打开错误的 URL - launchSettings.json file opens wrong URL 从Mac上的命令行运行ASP.NET 5应用程序时是使用launchSettings.json吗? - Is launchSettings.json used when running ASP.NET 5 apps from the command line on Mac?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM