Home > front end >  ASP.NET Core project: what does the folder name publish do? And how is this folder generated?
ASP.NET Core project: what does the folder name publish do? And how is this folder generated?

Time:08-09

Project file structure screenshot:

Project file structure screen shot

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?

CodePudding user response:

The publish folder you see is the result of a dotnet publish command. The dotnet publish command compiles app code and copies the files required to run the app into a publish folder. 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

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

  • Related