liveBook · Manning

Runtime identifier

As explained in ASP.NET Core in Action, 3e

A runtime identifier is a .NET deployment value that specifies the target operating system and architecture for application assets.

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

How ASP.NET Core in Action, 3e covers it

How deep it goes
Defines the publishing choice and demonstrates its command-line placement, but defers the complete identifier catalog to documentation.
Examples
Uses Windows 10 64-bit and win10-x64, then describes identifier-based self-contained deployment on Linux.
What it assumes
Distinguishes self-contained from runtime-dependent deployment and requires choosing a supported operating system and architecture.
What you can do after
Apply it via dotnet publish to produce a self-contained folder for a selected target machine.
How it connects
Connects self-contained deployment, runtime-dependent deployment, application publishing, and reverse proxy hosting.

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.