Back to results for “Deployment”
.NET › .NET CLI, SDK & Project Structure (csproj)

What is the difference between framework-dependent deployment (FDD) and self-contained deployment (SCD)?

Intermediate

Answer

Framework-dependent deployment produces a smaller output that relies on the target machine having the matching .NET runtime already installed. Self-contained deployment bundles the entire .NET runtime alongside the application, producing a larger output that can run on a machine with no .NET installed at all, at the cost of increased size and needing separate builds per target OS/architecture.
# Framework-dependent (smaller, needs runtime installed)
dotnet publish -c Release

# Self-contained (larger, standalone)
dotnet publish -c Release -r win-x64 --self-contained true
Real-world example A SaaS company distributing a desktop agent to customer machines uses self-contained deployment so customers don't need to separately install any .NET runtime, simplifying the installation experience.

Common follow-ups: What does the -r (runtime identifier) flag control?;How does self-contained deployment interact with trimming to reduce size?