Files
hiha-arvio/.github
Ismo Vuorinen 6ab9fcadfb fix: Specify target framework during restore in build workflows
Add -f parameter to dotnet restore commands to ensure assets are
generated for the specific target framework being built.

**Problem**:
- dotnet restore without -f flag restores all target frameworks
- But assets file (project.assets.json) might not include runtime identifiers
- Build fails with: "Assets file doesn't have a target for 'net8.0-maccatalyst/maccatalyst-x64'"
- Error NETSDK1047 when using --no-restore flag

**Solution**:
Explicitly restore for each target framework before building:
- iOS job: dotnet restore -f net8.0-ios
- macOS job: dotnet restore -f net8.0-maccatalyst

This ensures the assets file includes the correct runtime identifiers
(iossimulator-arm64, maccatalyst-x64, etc.) needed for the build.

**Changes**:
- build.yml: Add -f to restore for iOS and macOS jobs
- publish.yml: Add -f to restore for iOS and macOS jobs
- Updated step names for clarity

**Why This Works**:
The -f flag tells restore to generate assets for that specific TFM
and its associated RuntimeIdentifiers, which the build step requires.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 14:22:37 +02:00
..