Remove stryker thresholds configuration, add script to fix duplicate projects in solution, and create new solution file for StellaOps.Router with project references.

This commit is contained in:
StellaOps Bot
2025-12-26 21:54:17 +02:00
parent 335ff7da16
commit 9a4cd2e0f7
13 changed files with 9628 additions and 131 deletions

View File

@@ -0,0 +1,55 @@
#!/usr/bin/env pwsh
# fix-duplicate-projects.ps1 - Remove duplicate project entries from solution file
param(
[string]$SlnPath = "src/StellaOps.sln"
)
$content = Get-Content $SlnPath -Raw
$lines = $content -split "`r?`n"
$projectNames = @{}
$duplicateGuids = @()
$newLines = @()
$skipNextEndProject = $false
foreach ($line in $lines) {
if ($skipNextEndProject -and $line -eq "EndProject") {
$skipNextEndProject = $false
continue
}
if ($line -match 'Project\(.+\) = "([^"]+)",.*\{([A-F0-9-]+)\}"?$') {
$name = $Matches[1]
$guid = $Matches[2]
if ($projectNames.ContainsKey($name)) {
$duplicateGuids += $guid
Write-Host "Removing duplicate: $name ($guid)"
$skipNextEndProject = $true
continue
} else {
$projectNames[$name] = $true
}
}
$newLines += $line
}
# Also remove duplicate GUIDs from GlobalSection
$finalLines = @()
foreach ($line in $newLines) {
$skip = $false
foreach ($guid in $duplicateGuids) {
if ($line -match $guid) {
$skip = $true
break
}
}
if (-not $skip) {
$finalLines += $line
}
}
$finalLines | Out-File -FilePath $SlnPath -Encoding UTF8 -NoNewline
Write-Host "`nRemoved $($duplicateGuids.Count) duplicate projects"