Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

wix

wix3.5

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

like image 822
semaj Avatar asked Jan 04 '11 15:01

semaj


1 Answers

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.

like image 96
Christopher Painter Avatar answered Nov 15 '22 09:11

Christopher Painter