Aggiunta script x compilazione parallela, spostamento progetti old/disuso, limite paralleo a 3 per evitare errori
This commit is contained in:
-37
@@ -1,37 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.32126.317
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Data", "MP.Data\MP.Data.csproj", "{10BA8450-301D-49C7-8E1E-21B7469C225C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP-TAB", "MP-TAB\MP-TAB\MP-TAB.csproj", "{9141D627-EE10-4BF6-9A2C-AAC6845E185F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP-TAB.Client", "MP-TAB\MP-TAB.Client\MP-TAB.Client.csproj", "{28559808-58F2-424B-B65C-062AA59839EC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9141D627-EE10-4BF6-9A2C-AAC6845E185F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9141D627-EE10-4BF6-9A2C-AAC6845E185F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9141D627-EE10-4BF6-9A2C-AAC6845E185F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9141D627-EE10-4BF6-9A2C-AAC6845E185F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{28559808-58F2-424B-B65C-062AA59839EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{28559808-58F2-424B-B65C-062AA59839EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{28559808-58F2-424B-B65C-062AA59839EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{28559808-58F2-424B-B65C-062AA59839EC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {632D11D1-088B-4795-97E5-048534002558}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>8.16.2604.2718</Version>
|
||||
<Version>8.16.2605.2808</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP_TAB3</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 8.16.2604.2718</h4>
|
||||
<h4>Versione: 8.16.2605.2808</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2604.2718
|
||||
8.16.2605.2808
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2604.2718</version>
|
||||
<version>8.16.2605.2808</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.32126.317
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Data", "MP.Data\MP.Data.csproj", "{10BA8450-301D-49C7-8E1E-21B7469C225C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Mon", "MP.Mon\MP.Mon.csproj", "{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP.WASM.Mon.Server", "MP.WASM.Mon\Server\MP.WASM.Mon.Server.csproj", "{4A98B7F4-4EC6-4284-9D6C-63203DB981B1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP.WASM.Mon.Client", "MP.WASM.Mon\Client\MP.WASM.Mon.Client.csproj", "{9BF7BDE7-016A-458C-8791-494FD4204301}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{10BA8450-301D-49C7-8E1E-21B7469C225C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4A98B7F4-4EC6-4284-9D6C-63203DB981B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4A98B7F4-4EC6-4284-9D6C-63203DB981B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4A98B7F4-4EC6-4284-9D6C-63203DB981B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A98B7F4-4EC6-4284-9D6C-63203DB981B1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9BF7BDE7-016A-458C-8791-494FD4204301}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9BF7BDE7-016A-458C-8791-494FD4204301}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9BF7BDE7-016A-458C-8791-494FD4204301}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9BF7BDE7-016A-458C-8791-494FD4204301}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {632D11D1-088B-4795-97E5-048534002558}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.INVE</RootNamespace>
|
||||
<Version>8.16.2604.2716</Version>
|
||||
<Version>8.16.2605.2808</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOINVE </i>
|
||||
<h4>Versione: 8.16.2604.2716</h4>
|
||||
<h4>Versione: 8.16.2605.2808</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2604.2716
|
||||
8.16.2605.2808
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2604.2716</version>
|
||||
<version>8.16.2605.2808</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>8.16.2605.2719</Version>
|
||||
<Version>8.16.2605.2808</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MP-IOC </i>
|
||||
<h4>Versione: 8.16.2605.2719</h4>
|
||||
<h4>Versione: 8.16.2605.2808</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.2719
|
||||
8.16.2605.2808
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.2719</version>
|
||||
<version>8.16.2605.2808</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>MP.Land</RootNamespace>
|
||||
<Version>8.16.2605.0811</Version>
|
||||
<Version>8.16.2605.2808</Version>
|
||||
<Configurations>Debug;Release;Debug_LiManDebug</Configurations>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
<RunAnalyzersDuringBuild>True</RunAnalyzersDuringBuild>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo Tablet MAPO - DotNet6</i>
|
||||
<h4>Versione: 8.16.2605.0811</h4>
|
||||
<h4>Versione: 8.16.2605.2808</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.0811
|
||||
8.16.2605.2808
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.0811</version>
|
||||
<version>8.16.2605.2808</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.MON</RootNamespace>
|
||||
<AssemblyName>$(AssemblyName.Replace(' ', '_'))</AssemblyName>
|
||||
<Version>8.16.2604.2718</Version>
|
||||
<Version>8.16.2605.2808</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 8.16.2604.2718</h4>
|
||||
<h4>Versione: 8.16.2605.2808</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2604.2718
|
||||
8.16.2605.2808
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2604.2718</version>
|
||||
<version>8.16.2605.2808</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/MP.MON.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>MP.Prog</RootNamespace>
|
||||
<Version>6.16.2604.2715</Version>
|
||||
<Version>8.16.2605.2808</Version>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo gestione Programmi MAPO</i>
|
||||
<h4>Versione: 6.16.2604.2715</h4>
|
||||
<h4>Versione: 8.16.2605.2808</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2604.2715
|
||||
8.16.2605.2808
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2604.2715</version>
|
||||
<version>8.16.2605.2808</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.RIOC</RootNamespace>
|
||||
<Version>8.16.2605.2519</Version>
|
||||
<Version>8.16.2605.2808</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MP-RIOC </i>
|
||||
<h4>Versione: 8.16.2605.2519</h4>
|
||||
<h4>Versione: 8.16.2605.2808</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.2519
|
||||
8.16.2605.2808
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.2519</version>
|
||||
<version>8.16.2605.2808</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/MP.RIOC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>MP.Stats</RootNamespace>
|
||||
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
|
||||
<Version>8.16.2605.2713</Version>
|
||||
<Version>8.16.2605.2808</Version>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo statistiche MAPO</i>
|
||||
<h4>Versione: 8.16.2605.2713</h4>
|
||||
<h4>Versione: 8.16.2605.2808</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.2713
|
||||
8.16.2605.2808
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.2713</version>
|
||||
<version>8.16.2605.2808</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
# --- CONFIGURAZIONE ---
|
||||
$pattern = "MP-*.sln"
|
||||
$sharedProjectPath = ".\MP.Data\MP.Data.csproj"
|
||||
|
||||
# Controllo robusto del parametro --agent (cerca in tutti gli argomenti passati)
|
||||
$agentMode = $args -contains "--agent"
|
||||
|
||||
# Avvia il cronometro per calcolare il tempo totale
|
||||
$stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
|
||||
|
||||
# 1. Trova l'MSBuild ufficiale di Visual Studio 2022
|
||||
$vsPaths = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -version "[17.0,18.0)" -products * -requires Microsoft.Component.MSBuild -property installationPath
|
||||
if (-not $vsPaths) {
|
||||
if ($agentMode) { exit 1 }
|
||||
Write-Host "❌ Impossibile trovare Visual Studio 2022!" -ForegroundColor Red
|
||||
Exit
|
||||
}
|
||||
$msbuildPath = Join-Path $vsPaths[0] "MSBuild\Current\Bin\MSBuild.exe"
|
||||
|
||||
if (-not $agentMode) {
|
||||
Write-Host "🎯 Usando MSBuild di VS2022: $msbuildPath" -ForegroundColor Gray
|
||||
}
|
||||
|
||||
# Cerca tutte le soluzioni escludendo cartelle di build
|
||||
$solutions = Get-ChildItem -Path . -Filter $pattern -Recurse | Where-Object {
|
||||
$_.FullName -notmatch '\\(bin|obj|\\.git|\\.vs)\\.'
|
||||
}
|
||||
|
||||
if ($solutions.Count -eq 0) {
|
||||
if ($agentMode) { exit 1 }
|
||||
Write-Host "⚠️ Nessuna soluzione trovata che corrisponde al pattern: $pattern" -ForegroundColor Yellow
|
||||
Exit
|
||||
}
|
||||
|
||||
if (-not $agentMode) {
|
||||
Write-Host "🚀 Trovate $($solutions.Count) soluzioni univoche." -ForegroundColor Magenta
|
||||
}
|
||||
|
||||
# FASE 1: Compilazione preventiva del progetto comune
|
||||
if (Test-Path $sharedProjectPath) {
|
||||
if (-not $agentMode) { Write-Host "`n📦 Fase 1: Compilazione del progetto comune condiviso..." -ForegroundColor Cyan }
|
||||
|
||||
# AGGIORNAMENTO: Se siamo in agentMode silenziamo completamente MSBuild (/v:q) e ridirigiamo l'output
|
||||
if ($agentMode) {
|
||||
& $msbuildPath $sharedProjectPath /p:Configuration=Release /v:q /nologo > $null 2>&1
|
||||
}
|
||||
else {
|
||||
& $msbuildPath $sharedProjectPath /p:Configuration=Release /v:m /nologo
|
||||
}
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
if (-not $agentMode) { Write-Host "❌ Errore critico: Impossibile compilare il progetto comune. Interruzione." -ForegroundColor Red }
|
||||
exit 1
|
||||
}
|
||||
if (-not $agentMode) { Write-Host "✅ Progetto comune pronto." -ForegroundColor Green }
|
||||
}
|
||||
|
||||
# FASE 2: Compilazione parallela iniziale
|
||||
if (-not $agentMode) {
|
||||
Write-Host "`n🛠️ Fase 2: Avvio compilazione parallela delle soluzioni (Max 4)..." -ForegroundColor Magenta
|
||||
Write-Host "==================================================" -ForegroundColor Magenta
|
||||
}
|
||||
|
||||
$parallelResults = $solutions | ForEach-Object -Parallel {
|
||||
$solName = $_.Name
|
||||
$solPath = $_.FullName
|
||||
$msb = $using:msbuildPath
|
||||
|
||||
# Aggiunto /nologo per evitare intestazioni ripetute nei log interni
|
||||
$log = & $msb $solPath /p:Configuration=Release /m:1 /p:BuildInParallel=false /v:m /nologo 2>&1
|
||||
|
||||
[PSCustomObject]@{
|
||||
Name = $solName
|
||||
FullName = $solPath
|
||||
Success = ($LASTEXITCODE -eq 0)
|
||||
Log = $log
|
||||
}
|
||||
} -ThrottleLimit 3
|
||||
|
||||
# --- ANALISI PRIMO ROUND E FASE 3 (RETRY SEQUENZIALE) ---
|
||||
$successSolutions = @()
|
||||
$failedToRetry = @()
|
||||
|
||||
foreach ($res in $parallelResults) {
|
||||
if ($res.Success) {
|
||||
if (-not $agentMode) { Write-Host "✅ $($res.Name) compilata con successo (in parallelo)!" -ForegroundColor Green }
|
||||
$successSolutions += $res.Name
|
||||
}
|
||||
else {
|
||||
if (-not $agentMode) { Write-Host "⚠️ $($res.Name) fallita in parallelo. Accodata per il recupero sequenziale..." -ForegroundColor Yellow }
|
||||
$failedToRetry += $res
|
||||
}
|
||||
}
|
||||
|
||||
# Se ci sono falliti, li rieseguiamo UNO ALLA VOLTA pulendo la cache
|
||||
if ($failedToRetry.Count -gt 0) {
|
||||
if (-not $agentMode) {
|
||||
Write-Host "`n🔄 Fase 3: Riesecuzione sequenziale dei task falliti ($($failedToRetry.Count) soluzioni)..." -ForegroundColor Magenta
|
||||
Write-Host "==================================================" -ForegroundColor Magenta
|
||||
}
|
||||
|
||||
foreach ($failedRes in $failedToRetry) {
|
||||
if (-not $agentMode) { Write-Host "⏳ Ripristino e compilazione sequenziale: $($failedRes.Name)..." -ForegroundColor Cyan }
|
||||
|
||||
& $msbuildPath $failedRes.FullName /t:Restore /v:q /nologo > $null 2>&1
|
||||
& $msbuildPath $failedRes.FullName /t:Clean /v:q /p:Configuration=Release /nologo > $null 2>&1
|
||||
$retryLog = & $msbuildPath $failedRes.FullName /t:Build /p:Configuration=Release /v:m /nologo 2>&1
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
if (-not $agentMode) { Write-Host "✅ FALSO ALLARME: $($failedRes.Name) compilata correttamente in sequenziale!" -ForegroundColor Green }
|
||||
$successSolutions += $failedRes.Name
|
||||
}
|
||||
else {
|
||||
if (-not $agentMode) { Write-Host "❌ ERRORE REALE: $($failedRes.Name) è fallita anche in sequenziale." -ForegroundColor Red }
|
||||
$failedRes.Log = $retryLog
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Ferma il cronometro e calcola il tempo trascorso
|
||||
$stopwatch.Stop()
|
||||
$elapsedTime = "{0:mm\:ss}" -f $stopwatch.Elapsed
|
||||
|
||||
# --- ELABORAZIONE DEI RISULTATI FINALI ---
|
||||
$totalCount = $solutions.Count
|
||||
$successCount = $successSolutions.Count
|
||||
$failCount = $totalCount - $successCount
|
||||
$failColor = if ($failCount -gt 0) { "Red" } else { "Gray" }
|
||||
|
||||
# --- RIEPILOGO FINALE ---
|
||||
if (-not $agentMode) {
|
||||
Write-Host "`n==================================================" -ForegroundColor Magenta
|
||||
Write-Host "🏁 Processo di verifica completato in $elapsedTime!" -ForegroundColor Magenta
|
||||
Write-Host "==================================================" -ForegroundColor Magenta
|
||||
Write-Host " Soluzioni Totali: $totalCount" -ForegroundColor White
|
||||
Write-Host " Successi totali: $successCount" -ForegroundColor Green
|
||||
Write-Host " Errori reali: $failCount" -ForegroundColor $failColor
|
||||
Write-Host " Tempo impiegato: $elapsedTime" -ForegroundColor Cyan
|
||||
|
||||
if ($failCount -gt 0) {
|
||||
Write-Host "`n❌ Elenco delle soluzioni con ERRORI REALI:" -ForegroundColor Red
|
||||
foreach ($res in $parallelResults) {
|
||||
if ($successSolutions -notcontains $res.Name) {
|
||||
Write-Host " - $($res.Name)" -ForegroundColor Red
|
||||
Write-Host " 👉 Ultimi dettagli errore:" -ForegroundColor DarkRed
|
||||
$res.Log | Where-Object { $_ -match "error" } | Select-Object -First 3 | Write-Host -ForegroundColor Gray
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "`n🎉 Eccellente! Tutte le soluzioni compilano senza errori." -ForegroundColor Green
|
||||
}
|
||||
Write-Host "==================================================" -ForegroundColor Magenta
|
||||
}
|
||||
|
||||
# Exit code standard per ambienti automatizzati (0 = Successo, 1 = Fallimento)
|
||||
if ($failCount -gt 0) { exit 1 } else { exit 0 }
|
||||
Reference in New Issue
Block a user