Enable install of Preview MSI release side-by-side with Stable release#8513
Enable install of Preview MSI release side-by-side with Stable release#8513TravisEz13 merged 2 commits intoPowerShell:masterfrom
Conversation
There was a problem hiding this comment.
Interesting approach, at first it seems to be the right approach but then I was thinking to myself:
What if we just used "*" (meaning: auto-generate random GUID) for the Component GUIDs in Files.wxs, would that not achieve the same without needing to write code?
In general: what about applying something similar to Product.wxs as well whatever the best approach turns out to be?
|
@bergmeister If I'm understanding the docs correctly:
The generated id is the keypath of the file, example <Component Id="cmpE67BDD4BD52046578E30F0B2181877BA" Guid="{E67BDD4B-D520-4657-8E30-F0B2181877BA}">
<File Id="filE67BDD4BD52046578E30F0B2181877BA" KeyPath="yes" Source="$(env.ProductSourcePath)\System.DirectoryServices.dll" />
</Component>
|
|
Thanks Steve for clarification and cleaning up the temporary file. I noticed that the deletion of temporary files does not happen using a try-finally pattern in this function but I think for the purpose of this function that does not get called too often, it's probably good enough for that. |
…e release (PowerShell#8513)" This reverts commit 725bfda.
PR Summary
When installing (or upgrading) Preview builds the component ids for the files are the same as the installed files from the stable MSI. MSI sees this and assumes the file is already installed so skips installing files that haven't changed (been updated) which results in missing files in the preview install folder and pwsh fails to start. Fix is to dynamically generate new component ids (and compoentrefs) in
files.wxsusing_Previewsuffix and use that when building a preview package.Tested manually.
cc @bergmeister if you can help validate different scenarios.
Fix #8289
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests