Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Every way to ship an app

dotnet publish framework-dependent or self-contained, single file, trimmed, Native AOT, as a container, or as a NuGet package. What each one puts on the other machine.

Start from the machine you're shipping to, and add options only when you need what they give.

  • The machine has (or can get) the .NET runtime → a plain dotnet publish: framework-dependent, Release, small, and it picks up runtime security patches when the machine updates .NET.
  • The machine has no .NET, or you can't control which one → self-contained with a runtime identifier, dotnet publish -r linux-x64 --self-contained. Bigger, one OS and CPU, and you patch the runtime by republishing.
  • Users want one file to copy → add PublishSingleFile. It works with either mode above.
  • Startup time and size matter (a CLI tool, a serverless function) → Native AOT, if every library you use is trim- and AOT-safe. Treat each IL2xxx or IL3xxx warning as a bug.
  • It runs on a server or in the cloud → a container image, dotnet publish -t:PublishContainer, no Dockerfile needed.
  • Other developers will use it as a library → dotnet pack and publish a NuGet package.

Whatever you ship, ship the publish folder, never bin/Debug, and let CI build it the same way every time.

Build, run or publish

The build folder is for your machine; the publish folder is for everyone else's.

Choosing what to include

Bring the runtime or rely on the machine's, and who patches it afterwards.

linux-x64, win-arm64 and friends, and bundling the app into one executable.

Smaller and faster to start, at the price of reflection. The warnings tell you what would break.

Where it runs

Section

Containers

An image built by the SDK on a Microsoft base image, run the same way everywhere.

dotnet pack, package metadata and versioning, when your "app" is a library.

Every time, automatically

A workflow that builds, tests and publishes on every push, so shipping isn't a manual ritual.

The whole route end to end, from publish to a running container and a green CI run.