- Add MSBuild condition to only include net8.0-ios and net8.0-maccatalyst on macOS
- On Linux/Windows, only net8.0 is included as a target framework
- Fixes GitHub dependency submission failing on Ubuntu runners
- Remove wasm-tools installation from test workflow (no longer needed)
This fixes the root cause of NETSDK1147 errors on non-macOS platforms.
- Add least-privilege permissions to all GitHub Actions jobs
- Fixes 8 CodeQL security findings (actions/missing-workflow-permissions)
- Build jobs: contents:read, actions:write
- Release job: contents:write, actions:read
- Test job: contents:read, checks:write, actions:write
- Status jobs: no permissions needed
- Add wasm-tools-net8 workload installation for test workflow
Follows principle of least privilege and GitHub Actions security best practices.
- Add least-privilege permissions to all GitHub Actions jobs
- Fixes 8 CodeQL security findings (actions/missing-workflow-permissions)
- Build jobs: contents:read, actions:write
- Release job: contents:write, actions:read
- Test job: contents:read, checks:write, actions:write
- Status jobs: no permissions needed
Follows principle of least privilege and GitHub Actions security best practices.
- Change from TargetFramework (singular) to TargetFrameworks (plural)
- Overrides framework list for all projects in dependency graph
- Prevents transitive restore of iOS/macOS workloads on Linux runner
Add -p:TargetFramework=net8.0 to all dotnet commands in test workflow
to prevent transitive restoration of iOS/macOS target frameworks.
**Problem**:
- Test project references main HihaArvio project
- Main project has multi-target frameworks (net8.0, net8.0-ios, net8.0-maccatalyst)
- Restoring test project transitively restores all target frameworks
- iOS/macOS frameworks require macOS-specific workloads
- These workloads don't exist on Ubuntu runners
**Solution**:
Add `-p:TargetFramework=net8.0` to:
- dotnet restore (only restore for net8.0)
- dotnet build (only build for net8.0)
- dotnet test (only test for net8.0)
**Verification**:
Tested locally - all 189 tests pass with this approach.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fix workflow issues preventing builds from running:
**Test Workflow (test.yml)**
- Change from solution restore to test project only
- Only restore/build HihaArvio.Tests.csproj (net8.0 target)
- Prevents iOS/macOS workload errors on Ubuntu runner
- Tests run on Ubuntu (fast, cheap, no platform dependencies)
**Build Workflow (build.yml)**
- Replace `dotnet workload install maui` with `dotnet workload restore`
- Use project-specific restore instead of solution restore
- Restore only HihaArvio.csproj for each platform job
- Add `--no-restore` flag to build commands
- More reliable workload installation
**Publish Workflow (publish.yml)**
- Replace `dotnet workload install maui` with `dotnet workload restore`
- Use project-specific restore instead of solution restore
- Add `--no-restore` flag to publish commands
- Consistent with build workflow pattern
**Why These Changes**:
1. Solution restore on Linux tries to restore iOS/macOS targets
2. This requires workloads that don't exist on Ubuntu
3. Error: "NETSDK1147: workloads must be installed: wasm-tools-net8"
4. Solution: Only restore what each platform needs
5. Test project (net8.0) works on any platform
6. MAUI projects (iOS/macOS) only on macOS runners
**Benefits**:
- Tests run successfully on Ubuntu
- Faster workload installation (restore vs install)
- More explicit about dependencies
- Avoids unnecessary multi-platform restore
- Cleaner build logs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>