TP_SEI_Project/update-framework.ps1
2025-06-03 16:10:26 +02:00

11 lines
589 B
PowerShell

$projectFiles = Get-ChildItem -Path "C:\TFS Fideuram\TP_SEI_Project" -Filter "*.csproj" -Recurse
foreach ($projectFile in $projectFiles) {
$content = Get-Content $projectFile.FullName -Raw
if ($content -match '<TargetFrameworkVersion>v4\.[0-6]</TargetFrameworkVersion>') {
Write-Host "Updating $($projectFile.FullName)"
$updatedContent = $content -replace '<TargetFrameworkVersion>v4\.[0-6]</TargetFrameworkVersion>', '<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>'
Set-Content -Path $projectFile.FullName -Value $updatedContent -NoNewline
}
}