Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cleanup temporarily created WiX files after compilation to be able to have a clean re-build#5757

Merged
TravisEz13 merged 2 commits intoPowerShell:masterfrom
bergmeister:Wix_Cleanup_AfterCompilation
Jan 2, 2018
Merged

Cleanup temporarily created WiX files after compilation to be able to have a clean re-build#5757
TravisEz13 merged 2 commits intoPowerShell:masterfrom
bergmeister:Wix_Cleanup_AfterCompilation

Conversation

@bergmeister
Copy link
Contributor

@bergmeister bergmeister commented Dec 29, 2017

PR Summary

When changing the WiX installer locally and rebuilding the MSI one can get into the terrible situation whereby a code change does not get compiled into the new MSI.
This PR fixes the root cause of it, which is due to temporary WiX files that are created but not deleted after compilation and WiX then somehow decides to not recompile properly.

I also removed redundant parenthesis of surrounding code.

PR Checklist

Note: Please mark anything not applicable to this PR NA.

…can lead to wrong compilations after the first time due to caching.

Enhanced syntax
@@ -2168,6 +2168,9 @@ function New-MSIPackage
$WiXLightLog = & $wixLightExePath -out $msiLocationPath $wixObjProductPath $wixObjFragmentPath -ext WixUIExtension -ext WixUtilExtension -dWixUILicenseRtf="$LicenseFilePath" -v

Remove-Item -ErrorAction SilentlyContinue *.wixpdb -Force
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove item will take an array of paths.

@TravisEz13 TravisEz13 merged commit 238ff90 into PowerShell:master Jan 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants