Fix clean runner release restore#5
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d2ae16975
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| dotnet restore $project --locked-mode --artifacts-path $dotnetArtifacts | ||
| dotnet restore $project ` | ||
| --locked-mode ` | ||
| --runtime win-x64 ` |
There was a problem hiding this comment.
Restore the self-contained runtime packs
On a clean .NET 9 runner with no runtime packs cached, this restore is still framework-dependent: the .NET 8+ SDK behavior says a RID no longer implies SelfContained, and PublishSingleFile implies it only during dotnet publish, not dotnet restore. The publish immediately below uses --self-contained true --no-restore, so it can still request the Microsoft.NETCore.App/WindowsDesktop runtime packs that this restore did not download and hit NETSDK1112; pass -p:SelfContained=true here too, or set SelfContained in the project.
Useful? React with 👍 / 👎.
Summary
Restore the .NET runtime packs for
win-x64before running self-contained publish with--no-restore.Root cause
The release script restored without a runtime identifier, then published with
-r win-x64 --no-restore. Developer machines with cached runtime packs passed, while a clean GitHub runner failed withNETSDK1112forMicrosoft.NETCore.App.Runtime.win-x64andMicrosoft.WindowsDesktop.App.Runtime.win-x64.Validation
After merge, the 0.1.2 release workflow will be dispatched again.