Fragment element
Up to this point, we've been adding all of our WiX elements to the Product.wxs
file. When your installer packages hundreds of files, you'll find that having all of your code in one place makes reading it difficult. You can split your elements up into multiple .wxs
files for better organization and readability. Whereas your main source file, Product.wxs
, nests everything inside a Produc
t element, your additional .wxs
files will use Fragment
elements as their roots.
The Fragment
element doesn't need any attributes. It's simply a container. You can place just about anything inside of it, such as all of your Directory
elements or all of your Component
elements. For the next example, add a new WiX source file to your project and place ...
Get WiX: A Developer's Guide to Windows Installer XML now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.