Wix Toolset - Cannot create/install patch with fewer files/components than the original msi package

会有一股神秘感。 提交于 2020-01-25 07:31:26

问题


I have few locations on the field for which the initial .msi is same having about 2000 files (of multiple file types). However, I will have to send patches to few of the locations depending on the need so the patch should consist of fewer files (sometimes only 1 file as a fix). I am unable to create a patch (.msp) with just one single file or few files that I want to add/update but have to include all the original set of files as well. Can this be accomplished by any means? Please help !!

Also I do not want to do Major Upgrade as some of the original files are logs and database file which needs to stay intact and cannot be removed.

When I tried this scenario with simple text files where my .msi has 3 text files and the .msp has only 1 text file that I want to update, everything went successful and I could see the changes. But when I tried with my actual folder, I got this error:-

MSI (s) (A0:70) [16:17:59:147]: SELMGR: ComponentId '{B826B564-A3C4-45AB-9623-FB0089831140}' is registered to feature 'ProductFeature', but is not present in the Component table. Removal of components from a feature is not supported! MSI (s) (A0:70) [16:17:59:147]: SELMGR: Removal of a component from a feature is not supported

where the component it is referring to is a dll. Am I missing something when it comes to dlls ?


回答1:


Trying to completely understand what your requiring but it seems like you're trying to remove a component as part of what's called a minor upgrade. What you'll want to do instead of removing the component is just keep the component but instead remove the file attribute from that component. Essentially creating an empty component until you can next do a major upgrade.




回答2:


The only way to remove a file in a patch is to "puncture" the component. You do this by marking the component's Transitive transitive as true and putting a condition on the component that always evaluates to false. You must still keep the component and file in the MSI/MSP but you can provide a zero byte file.

When the minor upgrade / patch is applied the component will reevaluate and uninstall itself since the condition is false.

Whenever you do your next major upgrade you can remove the component entirely.




回答3:


Thank you David & Chris and all others for your time on this. For now, I have added new components as a new feature so that all existing components can belong to same feature. This has removed the error for me.



来源:https://stackoverflow.com/questions/59754016/wix-toolset-cannot-create-install-patch-with-fewer-files-components-than-the-o

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!