How to Work with Companion Files Using the <Files> Element in WiX v5+. #9055
-
Hi, I'm currently migrating to WiX Toolset v6 and have pretty much explored the new <Files> element introduced since Wix v5 to simplify file installations. However, I’m unclear on how to properly handle companion files in this setup. In normal file installation using the <File> element we have an option to set the Companion Files using the CompanionFile attribute. In v5, with the declarative element, what’s the recommended approach to ensure these companion files are correctly picked up and installed with their associated primary files? Any guidance or example snippet would be really appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Why are you using companion files? How many are you creating? What does your (resulting) .wxs code look like? |
Beta Was this translation helpful? Give feedback.
Yeah,
Files
doesn't do that because it puts each file in its own Component, and companion files can't be keypaths of a Component. So, it doesn't make sense forFiles
to do anything with companion files.Companion files are often used for configuration files, to make sure they get upgraded when a newer version is installed, even if the user modified them. It's strange to have hundreds of configuration files like that.