I am using Visual Studio 2012 + NI-DAQmx 9.7.5 (and tried 9.7.0 before that) and want to create an installer that includes the necessary merge modules MStudioDAQmx.2012.msm, its dependency MStudioCommon.2012.msm (and the Visual Studio C++ runtime) using WiX.
My problem is that the files contained in MStudioCommon.2012.msm seem to be installed in the GAC, where they belong, but the two files contained in MStudioDAQmx.2012.msm are copied into a folder "Module Retargetable Folder" in the installation directory - and that's where they IMHO do not belong. The difference between MStudioCommon.2012.msm and MStudioDAQmx.2012.msm is that, although both contain a custom action that rewrites the MergeRedirectFolder into a GAC folder,
MStudioCommon.2012.msm:
CA_RetargetDir.1C9B2EB5_9E34_4944_BA92_B30CCA4E9205 51 MergeRedirectFolder.1C9B2EB5_9E34_4944_BA92_B30CCA4E9205 [GAC.1C9B2EB5_9E34_4944_BA92_B30CCA4E9205]
MStudioDAQmx.2012.msm:
CA_RetargetDir.58D97DB1_77E6_476E_9B14_C9529BFA6F94 51 MergeRedirectFolder.58D97DB1_77E6_476E_9B14_C9529BFA6F94 [GAC.58D97DB1_77E6_476E_9B14_C9529BFA6F94]
Only MStudioCommon.2012.msm contains such a directory (GAC.1C9B2EB5_9E34_4944_BA92_B30CCA4E9205) in its directory table.
MergeRedirectFolder.1C9B2EB5_9E34_4944_BA92_B30CCA4E9205 TARGETDIR tdf6yy0s|Module Retargetable Folder
GAC.1C9B2EB5_9E34_4944_BA92_B30CCA4E9205 TARGETDIR boziguka|Global Assembly Cache
TARGETDIR SourceDir
MStudioDAQmx.2012.msm is missing such an entry.
MergeRedirectFolder.58D97DB1_77E6_476E_9B14_C9529BFA6F94 TARGETDIR tdf6yy0s|Module Retargetable Folder
TARGETDIR SourceDir
Is this the reason why the two files are installed in the wrong directory or am I doing something wrong? The corresponding parts of the WXS files are the following:
...
<Merge Id="VCRedist100" SourceFile="$(var.MergeModulesFilesDir)\Microsoft_VC100_CRT_x86.msm" DiskId="1" Language="0"/>
<Merge Id="MStudioCommon.2012" SourceFile="$(var.MergeModulesFilesDir)\MStudioCommon.2012.msm" DiskId="1" Language="0"/>
<Merge Id="MStudioDAQmx.2012" SourceFile="$(var.MergeModulesFilesDir)\MStudioDAQmx.2012.msm" DiskId="1" Language="0"/>
...
...
<Feature Id="VCRedist" Title="Visual C++ 10.0 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VCRedist100"/>
</Feature>
<Feature Id="MStudioCommon" Title="Measurement Studio Files" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="MStudioCommon.2012"/>
<MergeRef Id="MStudioDAQmx.2012"/>
</Feature>
...
I searched the web for two days, but cannot figure out what my mistake is. Any help is appreciated.