2026-05-10 09:42:29 -04:00
$ErrorActionPreference = 'Stop'
2026-05-31 11:18:27 -04:00
if ( -not ( Test-Path 'Dragon-ISO.Windows.slnf' ) ) {
throw " Run from the Dragon-ISO repo root. "
2026-05-10 09:42:29 -04:00
}
2026-05-31 11:18:27 -04:00
$env:Path = " C:\Program Files\dotnet; $env:Path "
2026-05-10 09:42:29 -04:00
Write-Host " === dotnet --version === " -ForegroundColor Cyan
dotnet - -version
Write-Host " "
Write-Host " === Restore === " -ForegroundColor Cyan
2026-05-31 11:18:27 -04:00
dotnet restore Dragon-ISO . Windows . slnf
2026-05-10 09:42:29 -04:00
if ( $LASTEXITCODE -ne 0 ) { throw " Restore failed. " }
Write-Host " "
Write-Host " === Build (Release, TreatWarningsAsErrors=true) === " -ForegroundColor Cyan
2026-05-31 11:18:27 -04:00
dotnet build Dragon-ISO . Windows . slnf - -configuration Release - -no -restore - -nologo
2026-05-10 09:42:29 -04:00
if ( $LASTEXITCODE -ne 0 ) {
2026-05-31 11:18:27 -04:00
throw " Build failed. Most likely cause for this batch: System.Windows.Automation needs an explicit Reference. If so, add to src/Dragon-ISO.App/Dragon-ISO.App.csproj inside an <ItemGroup>: <Reference Include='UIAutomationClient' /> <Reference Include='UIAutomationTypes' /> "
2026-05-10 09:42:29 -04:00
}
Write-Host " "
Write-Host " === Tests (excluding requires=ndi) === " -ForegroundColor Cyan
2026-05-31 11:18:27 -04:00
dotnet test Dragon-ISO . Windows . slnf `
2026-05-10 09:42:29 -04:00
- -configuration Release `
- -no -build `
- -nologo `
- -filter " Category!=ndi&requires!=ndi "
if ( $LASTEXITCODE -ne 0 ) { throw " Tests failed. " }
Write-Host " "
2026-05-17 19:03:33 -04:00
Write-Host " Build + tests green. " -ForegroundColor Green