In .NET Core, there are two primary types of deployment: Framework-Dependent Deployment (FDD) and Self-Contained Deployment (SCD). Each has its own characteristics, advantages, and disadvantages.
Framework-Dependent Deployment (FDD)
Characteristics:
- Dependency on Installed Runtime: The application relies on the presence of a shared .NET runtime on the target machine. Only the application binaries and third-party dependencies are included in the deployment package.
- Smaller Package Size: Since the .NET runtime is not included, the deployment package is significantly smaller. For example, a simple ASP.NET Core application might be around 2.66 MB.
- Cross-Platform: The application can be run on any platform that has the appropriate .NET runtime installed. The same binary can be executed on different operating systems using the
dotnet command.
Advantages:
- Reduced Disk and Memory Usage: Multiple applications can share the same .NET runtime, reducing overall disk and memory usage.
- Automatic Updates: Applications can benefit from updates to the .NET runtime without needing to be recompiled or redeployed. This includes security patches and performance improvements.
Disadvantages:
- Runtime Version Dependency: The application depends on the version of the .NET runtime installed on the target machine, which can lead to compatibility issues if the runtime is not the expected version.