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
Product element, your additional
.wxs files will use
Fragment elements as their roots.
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 ...