@@ -450,12 +450,25 @@ function Invoke-AppveyorFinish
450450 try {
451451 $releaseTag = Get-ReleaseTag
452452
453+ # Build clean before backing to remove files from testing
454+ Start-PSBuild - CrossGen - PSModuleRestore - Configuration ' Release' - ReleaseTag $releaseTag - Clean
455+
453456 # Build packages
454457 $packages = Start-PSPackage - Type msi, nupkg, zip - ReleaseTag $releaseTag - SkipReleaseChecks
458+ $msiObject = $packages | Where-Object { $_ -is [pscustomobject ] -and $_.msi }
459+ $msi = $msiObject | Where-Object { $_.msi.EndsWith (" .msi" ) } | Select-Object - ExpandProperty msi
455460
456461 $artifacts = New-Object System.Collections.ArrayList
457462 foreach ($package in $packages ) {
458- $null = $artifacts.Add ($package )
463+ if ($package -is [string ])
464+ {
465+ $null = $artifacts.Add ($package )
466+ }
467+ elseif ($package -is [pscustomobject ] -and $package.msi )
468+ {
469+ $null = $artifacts.Add ($package.msi )
470+ $null = $artifacts.Add ($package.wixpdb )
471+ }
459472 }
460473
461474 if ($env: APPVEYOR_REPO_TAG_NAME )
@@ -477,8 +490,8 @@ function Invoke-AppveyorFinish
477490 }
478491
479492 # Smoke Test MSI installer
480- Write-Verbose " Smoke-Testing MSI installer" - Verbose
481- $msi = $artifacts | Where-Object { $_.EndsWith (" .msi" ) }
493+ log " Smoke-Testing MSI installer"
494+ $msi = $artifacts | Where-Object { $_.EndsWith (" .msi" )}
482495 $msiLog = Join-Path (Get-Location ) ' msilog.txt'
483496 $msiExecProcess = Start-Process msiexec.exe - Wait - ArgumentList " /I $msi /quiet /l*vx $msiLog " - NoNewWindow - PassThru
484497 if ($msiExecProcess.ExitCode -ne 0 )
@@ -487,7 +500,8 @@ function Invoke-AppveyorFinish
487500 $exitCode = $msiExecProcess.ExitCode
488501 throw " MSI installer failed and returned error code $exitCode . MSI Log was uploaded as artifact."
489502 }
490- Write-Verbose " MSI smoke test was successful" - Verbose
503+
504+ log " MSI smoke test was successful"
491505
492506 # only publish assembly nuget packages if it is a daily build and tests passed
493507 if ((Test-DailyBuild ) -and $env: TestPassed -eq ' True' )
0 commit comments