Release build fails on a clean runner: ReadyToRun pack is not restored (NETSDK1094) #78

Closed
opened 2026-10-10 12:59:26 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-10-10 12:59:26 +00:00 (Migrated from github.com)

First run of the shared release workflow on v1.0.1-beta.2 (run 38053540124): Verify tag and all three gates passed, then Release / build failed in "Build (Release, warnings as errors)" with

error NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. [gclo/gclo.csproj]

gclo.csproj turns PublishReadyToRun (and PublishTrimmed) on for every non-Debug configuration, so a plain dotnet build -c Release needs the crossgen pack, which only a restore with that property set downloads. The shared workflow restores once (no configuration) and then builds Release, so the pack is missing on a clean runner; locally it passes only because the cache already holds it. Fix: make both properties publish-only (_IsPublishing), so the publish step's own restore fetches the pack. No release or draft was created, so the next rehearsal is v1.0.1-beta.3 (tags are immutable). Part of #62; blocks #67.

First run of the shared release workflow on `v1.0.1-beta.2` (run 38053540124): `Verify tag` and all three gates passed, then `Release / build` failed in "Build (Release, warnings as errors)" with ```text error NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. [gclo/gclo.csproj] ``` `gclo.csproj` turns `PublishReadyToRun` (and `PublishTrimmed`) on for every non-Debug configuration, so a plain `dotnet build -c Release` needs the crossgen pack, which only a restore with that property set downloads. The shared workflow restores once (no configuration) and then builds Release, so the pack is missing on a clean runner; locally it passes only because the cache already holds it. Fix: make both properties publish-only (`_IsPublishing`), so the publish step's own restore fetches the pack. No release or draft was created, so the next rehearsal is `v1.0.1-beta.3` (tags are immutable). Part of #62; blocks #67.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/gclo#78