WIX multiple copies of same file in msi but only one will be installed

不问归期 提交于 2019-12-12 10:52:44

问题


i have multiple environments, build, test, prod etc.

i'd like to create a single installer in wix, which can hold multiple machine.config files. then based on the feature value passed in through the command line only one file will be installed.

conceptualy it sounds easy but i receive an ICE30 error stating that

"ICE30: The target file 'btfrgsa_|[FILENAME]' is installed in '[TARGETDIR]\NETFRAMEWORK40FULLINSTALLROOTDIR64\CONFIG\' by two different components on an LFN system: 'MachineConfigs.WS' and 'MachineConfigs.APP'. This breaks component reference counting.".

what would be the best way to do this?

thanks

Semaj


回答1:


A couple of approaches:

  1. Create several features and components with files of different names ( 1.config, 2.config ) and then use the CopyFile element to cause x.config to be copied to the real file name. ) This will result in x.config and real.config being deployed but it's harmless and the uninstall will work cleanly.

  2. Identify the differences between the x.configs and use XML changes to apply them at install time using xpath statements.



来源:https://stackoverflow.com/questions/4595595/wix-multiple-copies-of-same-file-in-msi-but-only-one-will-be-installed

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