WiX 2716 error: Couldn't create a random subcomponent name for component

Viewed 134

I'm trying to make a Wix installer for a project containing approximately 9k files. It's building fine but when running the installer I get an error during the 'Computing space requirements' step:

…
Action ended 14:31:38: CostInitialize. Return value 1.
MSI (c) (7C:F8) [14:31:38:089]: Doing action: FileCost
MSI (c) (7C:F8) [14:31:38:090]: Note: 1: 2205 2:  3: ActionText 
Action 14:31:38: FileCost. Computing space requirements
Action start 14:31:38: FileCost.
MSI (c) (7C:F8) [14:31:38:093]: Note: 1: 2205 2:  3: MsiAssembly 
MSI (c) (7C:F8) [14:32:40:728]: Note: 1: 2716 2: id_841c16be109411ec8e165c80b69a0712 
MSI (c) (7C:F8) [14:32:40:740]: Note: 1: 2205 2:  3: Error 
MSI (c) (7C:F8) [14:32:40:740]: Note: 1: 2228 2:  3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 2716 
DEBUG: Error 2716:  Couldn't create a random subcomponent name for component 'id_841c16be109411ec8e165c80b69a0712'.

I can guarantee that the ID of each component is unique. I tried to Google for any msi limitations but nothing seems to apply in my case: I have 9k files, msi size is less that 1Gb. I tried splitting components among features so that each feature has less than 1600 components as stated here http://www.msifaq.com/a/1043.htm, but that didn't fix the problem. The error goes away however when I reduce total number of files included to ~8k. What can be a possible cause of the issue?

Here's the general representation of my wxs file:

<Wix>
    <Product>
        …
        <Directory>
        …
        </Directory>
        <FeatureGroup>
            <Feature>
                <Component Id="id_84aad4c710ac11ec92ad5c80b69a0712" Guid="84AAD4C8-10AC-11EC-A737-5C80B69A0712" Directory="id_811c471310ac11ec92af5c80b69a0712">
                    <File Id="id_84aad4c910ac11ec935c5c80b69a0712" Source="$(var.sourceDir)\bin\cache\dir\102.1\a47df368\shadercache\release\69128a2106de710dd07ad20c532a6a4c.v.desc" />
                    <RegistryValue Root="HKCU" Key="Software\Company\Product" Name="dummyName" Value="dummyValue" Type="string" KeyPath="yes" />
                    <RemoveFolder Id="id_84aad4ca10ac11ec9b0f5c80b69a0712" Directory="id_811c471310ac11ec92af5c80b69a0712" On="both" />
                    <RemoveFolder Id="id_84aad4cb10ac11eca2605c80b69a0712" Directory="id_811c471410ac11ec989a5c80b69a0712" On="both" />
                    <RemoveFolder Id="id_84aad4cc10ac11ecbb915c80b69a0712" Directory="id_811c471510ac11ec91155c80b69a0712" On="both" />
                    <RemoveFolder Id="id_84aad4cd10ac11ecaf505c80b69a0712" Directory="id_811c471610ac11ecbaa15c80b69a0712" On="both" />
                    <RemoveFolder Id="id_84aad4ce10ac11ec86a15c80b69a0712" Directory="id_811c471710ac11ec9b945c80b69a0712" On="both" />
                    <RemoveFolder Id="id_84aad4cf10ac11ecb6035c80b69a0712" Directory="id_811c471810ac11ec8ca15c80b69a0712" On="both" />
                    <RemoveFolder Id="id_84aad4d010ac11ec98ea5c80b69a0712" Directory="id_8111bfae10ac11ec8b805c80b69a0712" On="both" />
                    <RemoveFolder Id="id_84aad4d110ac11ec93125c80b69a0712" Directory="INSTALLDIR" On="both" />
                </Component>
                <Component>
                …
            </Feature>
            <Feature>
            …
        </FeatureGroup>
    </Product>
</Wix>

UPDATE: The problem was solved by removing all the RemoveFolder subcomponents (and moving the installation itself to the ProgramFiles folder). I assume that the total number of RemoveFolder entries was over some limit, although the only limitations mentioned in the doc concern number of components or number of files.

1 Answers

From the MSI help file:

MSI Error: 2716 - Could not create a random subcomponent name for component '[2]'.

May occur if the first 40 characters of two or more component names are identical. Ensure that the first 40 characters of component names are unique to the component.

It does not look like this is the case for your component names, but they are pretty similar. I see 9 identical first characters, perhaps there are further name clashes with more characters involved? Please check.

Perhaps you have file names that have more than 40 identical characters? https://www.advancedinstaller.com/forums/viewtopic.php?t=8213

Related