mirror of
https://github.com/ivuorinen/hiha-arvio.git
synced 2026-01-26 11:24:04 +00:00
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>
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -24,8 +24,8 @@ jobs:
|
||||
- name: Restore workloads
|
||||
run: dotnet workload restore src/HihaArvio/HihaArvio.csproj
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore src/HihaArvio/HihaArvio.csproj
|
||||
- name: Restore dependencies for iOS
|
||||
run: dotnet restore src/HihaArvio/HihaArvio.csproj -f net8.0-ios
|
||||
|
||||
- name: Build iOS
|
||||
run: dotnet build src/HihaArvio/HihaArvio.csproj -f net8.0-ios -c Release --no-restore /p:ArchiveOnBuild=false /p:EnableCodeSigning=false
|
||||
@@ -55,8 +55,8 @@ jobs:
|
||||
- name: Restore workloads
|
||||
run: dotnet workload restore src/HihaArvio/HihaArvio.csproj
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore src/HihaArvio/HihaArvio.csproj
|
||||
- name: Restore dependencies for macOS Catalyst
|
||||
run: dotnet restore src/HihaArvio/HihaArvio.csproj -f net8.0-maccatalyst
|
||||
|
||||
- name: Build macOS Catalyst
|
||||
run: dotnet build src/HihaArvio/HihaArvio.csproj -f net8.0-maccatalyst -c Release --no-restore /p:ArchiveOnBuild=false /p:EnableCodeSigning=false
|
||||
|
||||
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
@@ -101,8 +101,8 @@ jobs:
|
||||
- name: Restore workloads
|
||||
run: dotnet workload restore src/HihaArvio/HihaArvio.csproj
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore src/HihaArvio/HihaArvio.csproj
|
||||
- name: Restore dependencies for iOS
|
||||
run: dotnet restore src/HihaArvio/HihaArvio.csproj -f net8.0-ios
|
||||
|
||||
- name: Build iOS Release
|
||||
run: |
|
||||
@@ -148,8 +148,8 @@ jobs:
|
||||
- name: Restore workloads
|
||||
run: dotnet workload restore src/HihaArvio/HihaArvio.csproj
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore src/HihaArvio/HihaArvio.csproj
|
||||
- name: Restore dependencies for macOS Catalyst
|
||||
run: dotnet restore src/HihaArvio/HihaArvio.csproj -f net8.0-maccatalyst
|
||||
|
||||
- name: Build macOS Catalyst Release
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user