Skip to content

fix: restore per-platform RID so cross-compilation publish works#29

Merged
piers-sinclair merged 2 commits into
mainfrom
worktree-fix+release-restore
May 31, 2026
Merged

fix: restore per-platform RID so cross-compilation publish works#29
piers-sinclair merged 2 commits into
mainfrom
worktree-fix+release-restore

Conversation

@piers-sinclair
Copy link
Copy Markdown
Owner

Problem

release.yml ran dotnet restore (no -r flag), which only generates assets for net10.0 with no runtime identifier. Then dotnet publish --no-restore tried to use those assets for net10.0/win-x64, net10.0/osx-arm64, etc. — which don't exist in the assets file, causing NETSDK1047.

Fix

Remove --no-restore from the publish loop. Each dotnet publish -p:PublishProfile=<rid> now restores its own RID-specific assets before building. The initial dotnet restore is kept for the dotnet pack (NuGet) step, which only needs the default net10.0 target and is unaffected.

Merge order

Merge this before PR #28 (version bump to 1.2.3) so the fixed workflow is on main when the release triggers.

🤖 Generated with Claude Code

piers-sinclair and others added 2 commits May 31, 2026 16:57
…wn RID assets

dotnet restore without -r only creates assets for net10.0 (no RID), so
--no-restore on publish fails with NETSDK1047 when targeting win-x64 etc.
Letting each dotnet publish handle its own restore fixes cross-compilation.

dotnet pack --no-restore is fine — the initial restore covers net10.0 for packing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@piers-sinclair piers-sinclair merged commit e0a2400 into main May 31, 2026
1 check passed
@piers-sinclair piers-sinclair deleted the worktree-fix+release-restore branch May 31, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant