The installation had abundance of files which I harvested using Heat.exe
When I got to running it an unfamiliar error message popped:
2709: The specified Component name ('cmp8CD8B73AC8349972161D2AEAC3DDEE78') not found in Component table
Checking the MSI with Orca showed that the component was definitely present in the package.
Further investigation revealed an undocumented 65536 limit on component count - while my customer's application had nearly 200,000 bitmap files.
After having thought of the issue for a while, I reached 3 alternatives to solving it:
- Splitting the installation to several products, each with no more than 65536 components
- Zipping the bitmaps into few archives and extracting them during setup
- Grouping multiple files into fewer components.
The first option - splitting the installation to several products - was also cleared off the table due to inferior user experience.
That left me with grouping files into components as the best of imperfect options.
It does have pitfalls:
- It breaks component best-practices
- Files may be in-repairable since they are not key paths
Now... How was I to group 200,000 files into fewer components?
Having google'd that I concluded XSLT grouping using the Muenchian Method fitted just right.
With that I can group all the files within a directory to a single component. Since there were less than 65536 folders in my client's product, that was good enough for me.
I'll skip explaining the Muenchian Method itself since there's plenty of information about it on the web.
After implementing the grouping the installation passed perfectly.
I've assembled a project to demonstrate both issue and solution here.
To use the demo follow these steps:
- Download the code for wix-demo project
- Execute Grouping.bat to generate a folder hierarchy with 65550 files.
- Build both projects - NoGrouping will produce the mentioned error, Grouping solves it.