Edit

ASP.NET Core directory structure

Note

This isn't the latest version of this article. For the current release, see the .NET 11 version of this article.

The publish directory contains the app's deployable assets produced by the dotnet publish command. The directory contains:

App Type Directory Structure
Framework-dependent Executable (FDE)
  • publish†
    • Views† MVC apps; if views aren't precompiled
    • Pages† MVC or Razor Pages apps, if pages aren't precompiled
    • wwwroot†
    • *.dll files
    • {ASSEMBLY NAME}.deps.json
    • {ASSEMBLY NAME}.dll
    • {ASSEMBLY NAME}{.EXTENSION}.exe extension on Windows, no extension on macOS or Linux
    • {ASSEMBLY NAME}.pdb
    • {ASSEMBLY NAME}.runtimeconfig.json
    • web.config (IIS deployments)
    • createdump (Linux createdump utility)
    • *.so (Linux shared object library)
    • *.a (macOS archive)
    • *.dylib (macOS dynamic library)
Self-contained Deployment (SCD)
  • publish†
    • Views† MVC apps, if views aren't precompiled
    • Pages† MVC or Razor Pages apps, if pages aren't precompiled
    • wwwroot†
    • *.dll files
    • {ASSEMBLY NAME}.deps.json
    • {ASSEMBLY NAME}.dll
    • {ASSEMBLY NAME}{.EXTENSION} .exe extension on Windows, no extension on macOS or Linux
    • {ASSEMBLY NAME}.pdb
    • {ASSEMBLY NAME}.runtimeconfig.json
    • web.config (IIS deployments)

†Indicates a directory

The publish directory represents the content root path, also called the application base path, of the deployment. Whatever name is given to the publish directory of the deployed app on the server, its location serves as the server's physical path to the hosted app.

The wwwroot directory, if present, only contains static assets.

Additional resources