Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -710,11 +710,41 @@ jobs:
9.0.x
10.0.x

- name: Restore dependencies
run: dotnet restore
- name: Restore and build all projects
shell: pwsh
run: |
# Find solution file first (full recursive search), fall back to per-project restore
$solution = Get-ChildItem -Path . -Recurse -Include "*.sln", "*.slnx" -ErrorAction SilentlyContinue | Select-Object -First 1

if ($solution) {
Write-Host "Found solution: $($solution.FullName)"
dotnet restore $solution.FullName
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dotnet build $solution.FullName --no-restore --configuration Release
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
} else {
Write-Host "No solution file found, restoring and building projects individually..."
$projects = @(Get-ChildItem -Path 'src' -Recurse -Filter '*.csproj' -ErrorAction SilentlyContinue)
if ($projects.Count -eq 0) {
$projects = @(Get-ChildItem -Path . -Recurse -Filter '*.csproj' -ErrorAction SilentlyContinue)
}

if ($projects.Count -eq 0) {
Write-Error "❌ No solution or project files found - nothing to build"
exit 1
}

foreach ($proj in $projects) {
Write-Host "Restoring $($proj.Name)"
dotnet restore $proj.FullName
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Write-Host "Building $($proj.Name)"
dotnet build $proj.FullName --no-restore --configuration Release
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
}
Comment thread
Chris-Wolfgang marked this conversation as resolved.

- name: Build solution
run: dotnet build --no-restore --configuration Release
Write-Host "✅ All projects built successfully"

- name: Run all .NET tests (.NET 5.0-10.0 and Framework 4.6.2-4.8.1)
shell: pwsh
Expand Down
Loading