Skip to content

Fix Windows stage: per-project restore (no root solution)#152

Merged
Chris-Wolfgang merged 2 commits into
mainfrom
fix/pr-yaml-windows-restore-again
May 2, 2026
Merged

Fix Windows stage: per-project restore (no root solution)#152
Chris-Wolfgang merged 2 commits into
mainfrom
fix/pr-yaml-windows-restore-again

Conversation

@Chris-Wolfgang
Copy link
Copy Markdown
Owner

Summary

The pr.yaml from repo-template was synced back to this repo, reintroducing the bare dotnet restore at root that fails because this template pack has no solution file at root.

This is the same root cause we hit before — the repo-template multi-stage workflow doesn't fit a template pack repo. The Stage 2 Windows job runs dotnet restore and dotnet build from root with no solution/project specified.

Fix

Replace bare commands with logic that:

  1. Searches for a solution file (.sln/.slnx) recursively
  2. Falls back to per-project restore/build if no solution exists

This unblocks dependabot PRs #149, #150, and #151.

Note

This is a recurring issue. The repo-template workflow keeps getting synced here. Consider either:

  • Adding a sync exclusion for this repo's pr.yaml
  • Updating repo-template's workflow to handle the no-solution case
  • Using dotnet restore src/ instead of bare dotnet restore in repo-template

🤖 Generated with Claude Code

The repo-template pr.yaml was synced back, reintroducing the bare
dotnet restore at root that fails for this template pack.

This template pack has no solution file at root. Discover the solution
recursively or fall back to per-project restore/build.

Blocks all PRs (#149, #150, #151).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 2, 2026 00:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the PR workflow’s Windows stage to restore/build correctly in a template-pack repository where dotnet restore at repo root fails due to no root solution.

Changes:

  • Replaces bare root-level dotnet restore/dotnet build with a PowerShell step that looks for a solution file and builds it when present.
  • Adds a fallback path to restore/build each project individually when no solution file is found.

Comment thread .github/workflows/pr.yaml
Comment thread .github/workflows/pr.yaml Outdated
- Remove -Depth 2 limit so solution discovery is truly recursive
- Fail explicitly if no projects found (don't silently pass)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Chris-Wolfgang Chris-Wolfgang merged commit f60df6f into main May 2, 2026
12 of 13 checks passed
@Chris-Wolfgang Chris-Wolfgang deleted the fix/pr-yaml-windows-restore-again branch May 2, 2026 00:12
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.

2 participants