dotnet publish

The dotnet command that compiles an app and gathers everything needed to run it into a folder or container image, ready to deploy.

In more detail

Options decide who supplies the runtime (framework-dependent or self-contained), whether code is trimmed, and whether the result is a container. Use -c Release for production builds.

Example

dotnet publish -c Release

Related terms

Taught in

References