3

I have merged msm for vs 2015 crt:

<DirectoryRef Id="TARGETDIR" >
<Merge Id = "Microsoft_VC140_CRT_x64.msm" FileCompression = "yes" Language = "1033" SourceFile = "..\\..\\..\\..\\..\\..\\..\\external\\tools\\systemsetups\\merge_modules\\Microsoft_VC140_CRT_x64.msm" DiskId = "1" />"
</DirectoryRef>
<Feature>
<Feature Id="Complete" Title="Complete" Absent="allow" Level="1">
...
<MergeRef Id="Microsoft_VC140_CRT_x64.msm"/>
...
</Feature> 

but I still receiving:

---------------------------
MyApp.exe - System Error
---------------------------
The program can't start because mfc140u.dll is missing from your computer. Try reinstalling the program to fix this problem. 
---------------------------
OK   
---------------------------

Any ideas how to merge it properly?

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
kain64b
  • 2,258
  • 2
  • 15
  • 27

1 Answers1

5

It seems Microsoft recommends you use one of the redist executables (vcredist_x86.exe, vcredist_x64.exe) instead of the merge modules (see towards bottom) these days since the 2015 versions of the runtimes are more complicated than before and the merge modules are basically insufficient: "There will not be a merge module for the Universal CRT".

UPDATE: How to install the exe binary VCRedist along with your MSI?.

This is fully explained by Bob Arnson in this answer: Redistributables for deploying C++ exe developed with Visual Studio 2015 on Windows 7 (must read link - it is the answer, I just added this one to throw in some further links as well).

Also, I don't have the list of merge modules in front of me on this Linux box, but perhaps there is an x86 version that you need - you are installing the x64 version? Just checking - these bitness issues are driving us all crazy.


Some Links:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • I found problem: Microsoft_VC110_MFC_x64.msm :) – kain64b Jul 19 '18 at 13:07
  • This answer is correct but how do I get WiX to do this. The WiX doco only mentions merge modules and I am forced by other factors to use WiX. – Dave May 20 '22 at 06:40
  • I added a link above to another answer of mine with some links on Burn - the tool in the WiX suite which can create setup.exe launchers that - among other things - can run installers in sequence. – Stein Åsmul May 20 '22 at 12:25