I'm brand new to WIX, trying to create an installer which will install a website on IIS. Part of that installation needs to be deleting a base web.config file and renaming an environment specific config to "web.config". My wxs fragment looks like this:
<Fragment> <DirectoryRef Id="INSTALLFOLDER"> <Component Id="InstallWebsite" Guid="aguid" KeyPath="yes"> <iis:WebSite Id="mysite" Description="mysite" Directory="INSTALLFOLDER" AutoStart="yes" StartOnInstall="yes"> <iis:WebAddress Id="AllUnassigned" Port="80" /> <iis:WebApplication Id="TheqApplication" Name="[theq][WEBSITE_ID]"></iis:WebApplication> </iis:WebSite> </Component> <Component Id="SiteEnvWebConfig" Guid="aguid" KeyPath="yes"> <Condition>DEPLOY_ENVIRONMENT="IT"</Condition> <RemoveFile Id="Remove_BaseWebConfig" On="install" Name="Web.config" /> <File Id="File_WebItConfig" Source="..\Published\Web.IT.config"> <CopyFile Id="Copy_WebItConfig" DestinationDirectory="INSTALLFOLDER" DestinationName="Web.config" /> </File> </Component> </DirectoryRef> <ComponentGroup Id="TheqIisConfiguration"> <ComponentRef Id="InstallWebsite" /> <ComponentRef Id="SiteEnvWebConfig" /> </ComponentGroup> </Fragment> The CopyFile operation seems to be working, meaning I get the correct content in Web.config after I copy Web.IT.config to that name. The problem is, I get an ICE30 error like so: (WIX target) -> path\to\IISConfiguration.wxs(24): error LGHT0204: ICE30: Installation of a conditionalized component would cause the target file 'y1svim1k.con| Web.IT.config' to be installed in '[TARGETDIR]\path\to\site\root\' by two different components on an LFN system: 'cmp4588D1A2BA17F4F94 24B19AB0E99532D' and 'SiteEnvWebConfig'. This would break component reference counting. [path\to\setup.build] I assume this is because my InstallWebsite component and my SiteEnvWebConfig component are messing with the same file. So, questions: 1. Is there a way to overwrite the Web.config with the (renamed) environment config file without deleting the Web.config file first, and without getting the ICE30 error? It's an error, not a warning, so WIX doesn't clean up its temp files when it's done, which is a bother. 2. I tried using RemoveFile inside the DirectoryRef above to remove Web.config, but the file never gets removed. When I try to specify a Directory attribute for RemoveFile, WIX complains because I can't have a slash in it. When I try to define the path as a Property, WIX complains that ther're a bad reference to symbol "Directory:CONFIGPATH" (or whatever id I give to the property). How can I name a Property and give it a value of a path with slashes in it? Roy ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users