What is the difference between framework-dependent deployment (FDD) and self-contained deployment (SCD)?
Short answer
Framework-dependent deployment produces a smaller output that relies on the target machine having the matching .NET runtime already installed.
Advertisement
AModel 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 trueReal-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.
Likely follow-ups
- What does the -r (runtime identifier) flag control?
- How does self-contained deployment interact with trimming to reduce size?
Related topics