Skip to content

Commit

Permalink
debugging info for Get Target Frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
AkazaRenn committed Aug 28, 2024
1 parent 16d85d7 commit 0c71bc8
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,22 @@ jobs:

- name: Get Target Frameworks
run: |
Write-Host "Starting to extract target frameworks..."
$csprojFiles = Get-ChildItem -Path '**/*.csproj'
Write-Host "Found .csproj files: $($csprojFiles.Count)"
$frameworks = @()
foreach ($file in $csprojFiles) {
[xml]$csproj = Get-Content -Path $file.FullName
$framework = $csproj.Project.PropertyGroup.TargetFramework
$frameworks += $framework
Write-Host "Processing file: $($file.FullName)"
[xml]$csproj = Get-Content -Path $file.FullName
$framework = $csproj.Project.PropertyGroup.TargetFramework
Write-Host "Extracted framework: $framework"
$frameworks += $framework
}
$uniqueFrameworks = $frameworks | Sort-Object -Unique
Write-Host "Unique frameworks: $($uniqueFrameworks -join ',')"
$uniqueFrameworks -join ',' | Out-File -FilePath frameworks.txt
echo "Required .NET versions:"
cat frameworks.txt
Write-Host "Content of frameworks.txt:"
Get-Content frameworks.txt
echo "frameworks=$(Get-Content frameworks.txt)" >> $GITHUB_ENV
- name: Setup .NET
Expand Down

0 comments on commit 0c71bc8

Please sign in to comment.