Utopia-Canteen-System/scripts/publish-client-selfcontaine...

20 lines
554 B
PowerShell

$ErrorActionPreference = "Stop"
$ProjectPath = ".\UtopiaCanteen.Client\UtopiaCanteen.Client.csproj"
$OutputPath = "C:\Users\Public\UtopiaCanteenClient"
Write-Host "Cleaning old client publish folder..."
if (Test-Path $OutputPath) {
Remove-Item $OutputPath -Recurse -Force
}
Write-Host "Publishing client as self-contained..."
dotnet publish $ProjectPath `
-c Release `
-r win-x64 `
--self-contained true `
-p:PublishSingleFile=false `
-o $OutputPath
Write-Host "Client self-contained publish completed:"
Write-Host $OutputPath