A runtime identifier specifies the operating system and architecture targeted when publishing an application. It is required for a self-contained deployment, which includes the .NET runtime and can run without a separately installed runtime. section 27.1.1
A runtime identifier affects deployment in several practical ways:
- It selects a platform such as Windows 10 64-bit. section 27.1.1
- It makes the publish output platform-specific rather than portable across operating systems and architectures. section 27.1.1
- The resulting folder contains the application executable, assemblies, and the .NET runtime; deploy the whole folder to the target machine. section 27.1.1
- Linux self-contained deployments use the same identifier-based publishing approach, followed by server prerequisites and hosting configuration. section 27.3.1
Publishing for Windows
Use `dotnet publish -c Release -r win10-x64 --self-contained -o publish_folder` to publish a Release build for Windows 10 64-bit into `publish_folder`. Deploy the complete folder rather than only the application executable. section 27.1.1
dotnet publish -c Release -r win10-x64 --self-contained -o publish_folder
The command listing shows where the runtime identifier appears in a self-contained `dotnet publish` command. section 27.1.1
