save progress

This commit is contained in:
StellaOps Bot
2025-12-26 22:03:32 +02:00
parent 9a4cd2e0f7
commit e6c47c8f50
3634 changed files with 253222 additions and 56632 deletions

17
fix-xunit-refs.ps1 Normal file
View File

@@ -0,0 +1,17 @@
$xunitPackages = @'
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
'@
Get-ChildItem -Path "src" -Filter "*.csproj" -Recurse | Where-Object { $_.Name -like "*.Tests.csproj" } | ForEach-Object {
$content = Get-Content $_.FullName -Raw
if ($content -match '<IsTestProject>true</IsTestProject>' -and $content -notmatch 'Include="xunit"') {
# Find the first ItemGroup with PackageReference and add xunit there
if ($content -match '(<ItemGroup>\s*<PackageReference)') {
$content = $content -replace '(<ItemGroup>\s*<PackageReference)', "$xunitPackages`n`$1"
Set-Content $_.FullName $content -NoNewline
Write-Host "Added xunit to: $($_.FullName)"
}
}
}