1
votes

I want to create a setup file with the WiX Toolset. To do this I am generating a Solution using the Heat tool on a directory. The problem arises when I want to edit a web.config file from that solution.

I always get this error when compiling.

Severity Code Description Project File Line Suppression State Error ICE30: The target file 'jn9q_isq.con|web.config' is installed in '[TARGETDIR]\inetpub\vTimeEngineAPI\' by two different components on an LFN system: 'InstallWebConfigTe' and 'cmpA228938071CAE6FF139C38D6724F819B'. This breaks component reference counting. vTimeMainSetup C:\TSVtime\NewTimeAPISetup\Features\vTimeEngineFeature.wxs 40

This is my code for getting and editing the file:

<ComponentGroupRef Id="File.Generated"/>
  <Component Id="InstallWebConfigTe" Guid="*">
    <File Id="WebConfigTe" Name="web.config" Source="SourceDir\Web.config" Vital="yes" KeyPath="yes" />
    <util:XmlFile Id="WebConfigSetDbTypeTe" Action="setValue" Permanent="yes" File="[#WebConfigTe]"
                  ElementPath="/configuration/Configuration/Database/add[\[]@key='ServerKind'[\]]" Name="value" Value="[DATABASE_TYPE]" />
  </Component>
2

2 Answers

1
votes

Perhaps you can try the suggestion found in this answer (just the first one I found that made some sort of sense): WiX ICE30 error but directory is correct.

Your WiX source extract is too small to tell whether this can be the issue or not. Just open your compiled MSI in Orca to verify if this problem exists in the directory table.

Do you install multiple versions of web.config by any chance? If so, perhaps try to read this answer (read all answers): How to manage files with same name in Wix?

0
votes

I think you are saying that heat has harvested the same file as you are manually creating a Component for.

If you want to modify heat's generated authoring, you can pass it an XSLT (-t argument) to add the util:XmlFile element to the appropriate Component element.

Or, you could have the XSLT remove the Component and keep the manually created one. (This can be harder if the generated authoring includes a ComponentRef for the Component.)