Rectangle 27 0

I had a similar problem and it was because I wasn't implementing fragments correctly...

A good basic explanation of fragments can be found here...

  • FilesFragment.wxs - xml file containing all the files I got from heat).

Where I went wrong was that I thought I needed to have some sort of include reference in Product.wxs that would reference to FilesFragment.wxs. Similar to how you would do in a c++ project. For instance I assumed if I wanted to include a additional wxs file called wixfile.wxs in my main installation I would need some sort of

<?include wixfile.wxs?>

This was an incorrect assumption. This relationship is set up in your project file (ending with .wixproj), by virtue of having it there, it knows the file exists.

In the Product.wxs file I then needed to set up a Feature that had a ComponentGroupRef with an Id that referenced the ComponentGroup ID in my FilesFragment.wxs file.

Example of file contents...

<Feature Id="ProductFeature" Title="Setup MaxCut" Level="1">
  <ComponentGroupRef Id="FilesFragment" />
</Feature>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
    <DirectoryRef Id="APPLICATIONFOLDER">
        <Component Id="xyz" Guid="{abc...}">
            <File ... />
        </Component>
    ...       
    </DirectoryRef>
</Fragment>
...

<Fragment>
    <ComponentGroup Id="FilesFragment">
        <ComponentRef Id="xyz" />
    </ComponentGroup>
</Fragment>

This achieved what I needed. I think it is what you are trying to do as well?

wix3 - WIX error with The document element name 'Wix' is invalid - Sta...

wix wix3