A self-contained deployment (SCD) packages the .NET runtime with an application’s code and libraries, so the target machine does not need .NET installed. section 27.1.1 section 2.4.1
Choose an SCD when deployment isolation matters more than the smallest output:
- Avoid dependence on the .NET version installed by the hosting machine. section 27.1.1
- Accept larger deployment files because the complete .NET framework is included. section 27.1.1
- Compile specifically for the target operating system and architecture instead of deploying the same files everywhere. section 27.1.1 section 2.4.1
Publish for a Windows target
Run `dotnet publish -c Release -r win10-x64 --self-contained -o publish_folder` to create a release deployment for 64-bit Windows. The runtime and application files are placed in the specified output folder. section 27.1.1
dotnet publish -c Release -r win10-x64 --self-contained -o publish_folder
Use the publish command as a starting point for creating a target-specific self-contained deployment. section 27.1.1
