Skip to content
Latchkey

dotnet publish self-contained runtime not found (RID) in CI

A self-contained publish needs a Runtime Identifier that maps to an available runtime pack. When the RID is misspelled, unsupported by the SDK, or its runtime pack is not restorable, publish fails because it cannot assemble a self-contained app for that platform.

What this error means

The publish step fails resolving the RID (e.g. NETSDK1083 "The specified RuntimeIdentifier X is not recognized") or cannot restore the runtime pack. It reproduces every run for that RID.

dotnet
error NETSDK1083: The specified RuntimeIdentifier 'linux-x65' is not recognized.

Common causes

A misspelled or unsupported RID

The -r/RuntimeIdentifier value is wrong (typo) or not supported by the SDK version, so no runtime pack matches.

The runtime pack cannot be restored

The feed lacks the runtime pack for that RID, or restore did not pull it before publish.

How to fix it

Use a valid RID and restore its pack

  1. Use a supported RID (e.g. linux-x64, win-x64, osx-arm64).
  2. Ensure restore can reach nuget.org for the runtime pack, then publish self-contained.
  3. Re-run.
shell
dotnet publish -c Release -r linux-x64 --self-contained true

How to prevent it

  • Reference the RID catalog rather than typing RIDs from memory.
  • Keep the SDK new enough to support the RIDs you publish for.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →