Incorporating the merge module into a WIX installer

Topics: Enterprise Library Core, General discussion
Aug 5, 2011 at 4:10 PM


I use Wix to create an MSI that installs my product.  Previously, I included a few enterprise library assemblies manually, however I've recently discovered the merge module (Enterprise Library 5.0 - Binaries.msm) that ships with enterprise library.  I've included the module in my MSI, but all the files in the merge module get installed to C:\, regardless of where in my directory hierarchy I reference it.  I have other merge modules that seem to install fine. 

Is there an installation folder property I need to set, or something else I'm missing?

Here is the relevant Wix (the MMServer merge module installs to c:\program files\MyFolder\Installer Test\Server Merge Module, while the EnterpriseLibraryBinaries merge module installs to c:\):

<Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="$(var.PlatformProgramFilesFolder)">
        <Directory Id="INSTALLLOCATION" Name="!(loc.MyFolder)">
          <Directory Id="InstallerTest" Name="Installer Test">
            <Directory Id="Server" Name="Server Merge Module">
              <Merge Id="MMServer" Language="!(loc.Language)" SourceFile="$(var.MMServer.TargetPath)" DiskId="1" />
            <Directory Id="EntLib" Name="Enterprise Library Merge Module">
              <Merge Id="EnterpriseLibraryBinaries" Language="!(loc.Language)" SourceFile="..\InstallerCommon\MergeModules\Enterprise Library 5.0 - Binaries.msm" DiskId="1" />

    <Feature Id="InstallerTestFeature" Title="Installer Tester" Level="1"  >
      <MergeRef Id="MMServer" />
      <MergeRef Id="EnterpriseLibraryBinaries" />

Aug 8, 2011 at 4:54 AM


I'm afraid this is more of a wix question. You can try this link if it addresses your question.


Noel Angelo Bolasoc
Global Technologies and Solutions
Avanade, Inc.
Contact Us

Aug 8, 2011 at 5:32 PM

Yes, I used that link to create my wix project and add my existing merge modules - they all work fine where enteprise library does not. 

I've posted a question to the Wix mailing list to see if anyone else has come across this issue.  If I find the solution, I'll post it here.

In the meantime, if anyone else has any ideas, please let me know!


Aug 9, 2011 at 2:32 PM

I've heard back from the Wix folks.  They indicated that the merge module does not follow best practices and therefore does not "play nice" with Wix (in particular, it lacks the redirection mechanism for redirecting files to my application's directory, and it lumps all of its files into a single component).  They suggest I use Heat to achieve what I want, however I need a Wix merge module and therefore I will be writing my own Enterprise Library module for my use going forward.