[wix-users] How to link fragment into a module to produce merge module

Andres Armengol andres.armengol at pantec.com
Mon Nov 7 03:32:12 PST 2016


I have a source.wxs that defines a fragment with a component group that have many components (generated using heat) and a mergemodule.wxs that defines a Module to produce my merge module.

The source.wxs looks like this:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
        <DirectoryRef Id="MergeRedirectFolder">
        </DirectoryRef>
    </Fragment>
    <Fragment>
        <ComponentGroup Id="SourceGroup">
            <Component Id="cmp0451D1432725862C613AE7063D2D009A" Directory="MergeRedirectFolder" Guid="*">
                <File Id="fil040913A08FB7E160509231AFAE6B3BF6" KeyPath="yes" Source="file.txt" />
            </Component>
...
        </ComponentGroup>
    </Fragment>
</Wix>

And the mergemodule.wxs looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Module
...
    >
    <Package
...
    />

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="MergeRedirectFolder">
      </Directory>
    </Directory>

  </Module>
</Wix>

When I use candle and light with both files there are no files in my merge module.
candle.exe MergeModule.wxs Source.wxs
light.exe -out mergemodule.msm MergeModule.wixobj Source.wixobj

I haven't found the way to link or reference the fragment in my module. Is there any way for that?

Regards
Andres


More information about the wix-users mailing list