Files
skystack/build.ps1
2025-08-30 18:55:20 -04:00

40 lines
1.2 KiB
PowerShell

#!/usr/bin/env pwsh
Write-Host "=== QEMU VM Manager Build Script ===" -ForegroundColor Green
# Check if .NET is available
try {
$dotnetVersion = dotnet --version
Write-Host "Using .NET version: $dotnetVersion" -ForegroundColor Yellow
} catch {
Write-Host "Error: .NET is not available or not properly installed." -ForegroundColor Red
Write-Host "Please install .NET 8.0 SDK from: https://dotnet.microsoft.com/download" -ForegroundColor Yellow
exit 1
}
# Clean previous builds
Write-Host "Cleaning previous builds..." -ForegroundColor Blue
dotnet clean
# Restore packages
Write-Host "Restoring packages..." -ForegroundColor Blue
dotnet restore
# Build the solution
Write-Host "Building solution..." -ForegroundColor Blue
dotnet build --configuration Release
if ($LASTEXITCODE -eq 0) {
Write-Host "Build completed successfully!" -ForegroundColor Green
# Show build output
Write-Host "`nBuild output:" -ForegroundColor Yellow
dotnet build --configuration Release --verbosity quiet
Write-Host "`nTo run the application:" -ForegroundColor Cyan
Write-Host "dotnet run --project QemuVmManager.Console" -ForegroundColor White
} else {
Write-Host "Build failed!" -ForegroundColor Red
exit 1
}