dotnet publish: self-contained vs framework-dependent, single-file, ReadyToRun and Native AOT
dotnet publish can produce very different outputs from the same project: a small framework-dependent app that needs .NET installed, a self-contained folder that carries its own runtime, a single file, a ReadyToRun build or a Native AOT executable. This guide explains each mode with the exact command, what it produces, and how to choose.