64-bit merge module problems

Jan 30, 2015 at 3:10 PM
Hi

I really love this solution! But now I'm stuck and getting the following message:

'C:\Program Files (x86)\Common Files\Merge Modules\Microsoft_VC110_CRT_x64.msm' is a 64-bit merge module but the product consuming it is 32-bit. 32-bit products can consume only 32-bit merge modules.

Who can help me?!

Thnx!

Robin Lutteke
Jan 31, 2015 at 2:28 AM
Can you please describe what exactly you are doing and what tool emits the error message.
Feb 2, 2015 at 7:15 AM
Edited Feb 2, 2015 at 8:17 AM
I'm adding three x64 redistributables to my msi. They are needed for the dlls that I've created.

new Merge(pathMergeModules + "Microsoft_VC110_CRT_x64.msm"),
new Merge(pathMergeModules + "Microsoft_VC110_MFC_x64.msm"),
new Merge(pathMergeModules + "Microsoft_VC110_MFCLOC_x64.msm")

I get the the following error as output in visual studio 2012:

setup.wxs(38): error LGHT0345: 'C:\Program Files (x86)\Common Files\Merge Modules\Microsoft_VC110_CRT_x64.msm' is a 64-bit merge module but the product consuming it is 32-bit. 32-bit products can consume only 32-bit merge modules.

setup.wxs(39): error LGHT0345: 'C:\Program Files (x86)\Common Files\Merge Modules\Microsoft_VC110_MFC_x64.msm' is a 64-bit merge module but the product consuming it is 32-bit. 32-bit products can consume only 32-bit merge modules.

setup.wxs(40): error LGHT0345: 'C:\Program Files (x86)\Common Files\Merge Modules\Microsoft_VC110_MFCLOC_x64.msm' is a 64-bit merge module but the product consuming it is 32-bit. 32-bit products can consume only 32-bit merge modules.
Feb 2, 2015 at 11:08 AM
Your product components are marked as x86 so you need to use Microsoft_VC_*x86.msm.

Or if indeed you are building x64 setup then all your components must have Win64 set to 'yes'. Currently only RegValue supports this attribute directly but for everything else you can just use the attribute definitions:
new File("some path"){ AttributesDefinition = "Component:Win64=yes" },
Or you can do it in a single hit:
Compiler.WixSourceGenerated += document =>
    {
        document.Descendants("Components")
                .ToList()
                .ForEach(e => e.Add(new XAttribute("Win64", "yes")));
    };
All these techniques are described in the "Overcoming Wix# limitations" section here.
Marked as answer by luttyfrutty on 2/2/2015 at 5:17 AM