简体   繁体   English

ASP.NET 核心工程:文件夹名发布有什么作用? 这个文件夹是如何生成的?

[英]ASP.NET Core project: what does the folder name publish do? And how is this folder generated?

Project file structure screenshot:项目文件结构截图:

项目文件结构截图

I have my project structure as shown in the screenshot, and I am just wondering what does the publish folder do, and how does it get generated?我的项目结构如屏幕截图所示,我只是想知道发布文件夹的作用是什么,它是如何生成的? Is it there because the app is published?是否因为应用程序已发布而存在?

The publish folder you see is the result of a dotnet publish command.您看到的发布文件夹是dotnet publish命令的结果。 The dotnet publish command compiles app code and copies the files required to run the app into a publish folder. dotnet publish命令编译应用程序代码并将运行应用程序所需的文件复制到发布文件夹中。 The content of the folder can then be copied to a hosting system for deployment.然后可以将文件夹的内容复制到托管系统以进行部署。

More info about dotnet publish command: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish有关 dotnet 发布命令的更多信息: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish

More info about publishing and deploying asp.net core apps: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/?view=aspnetcore-6.0#publish-to-a-folder有关发布和部署 asp.net 核心应用程序的更多信息: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/?view=aspnetcore-6.0#publish-to-a-folder

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM