Wayne Jung
Wayne Jung

Reputation: 3

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

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?

Upvotes: 0

Views: 1415

Answers (1)

Dimitris Maragkos
Dimitris Maragkos

Reputation: 11302

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://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish

More info about publishing and deploying asp.net core apps: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/?view=aspnetcore-6.0#publish-to-a-folder

Upvotes: 1

Related Questions