wixwindows-installervisual-c++-runtime

WIX merge c++ runtime


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?


Solution

  • 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: