Where is "msvcR140.dll"? Does it exist?

Pierre picture Pierre · May 9, 2017 · Viewed 11.6k times · Source

I have recently graduated to VS 2015. For reasons explained below, I want to avoid running the VC++ Redistributables installer. I am including the prescribed DLLs in my installer, for an "app local" installation:

MFC140.DLL
concrt140.dll
msvcp140.dll
vccorlib140.dll
vcruntime140.dll
mfc140u.dll
mfcm140u.dll

This seems to work. My app runs when installed thus on a "virgin" PC.

My question is, where do I find msvcr140.dll?

It is mentioned here: https://www.visualstudio.com/license-terms/mt228262/. I cannot find it anywhere when searching all directories on a PC where VC Redistributables has been installed. Does it exist? Is Windows concealing it?


Note 1: Why I need to avoid the MS VC++ Redistributables installer:

  • It shows up as a separate install in my WiX installer. It is very confusing for my market demographic (consumers).
  • When my software is uninstalled, it is also necessary to uninstall VC Redist., which can lead to complications.
  • In a couple of instances, there has been some sort of screw-up that has rendered the PC inoperable. I suspect repeated VC Redist installs. What happens is that a Standard User is no longer able to start any programs.
  • VC Redist. has bloated my installer from 25MB to 40MB, an extra 15MB. By picking which components I need, I trimmed it by 10 MB.
  • WiX code to test for prior versions is complex, arcane and inscrutable.
  • Yes, I understand about the benefits of automatic updating of Windows DLLs. However, a PC with out-of-date DLLs is better than a PC that is unusable.

Note 2: I can't do a static link, my app is a mixed bag of Win32 and MFC DLLs, I get linker errors.

Answer

zett42 picture zett42 · May 9, 2017

It appears that the "msvcr140.dll" is "missing" because of the introduction of the Universal CRT in Visual Studio 2015.

See also this answer and this one.

Looking inside the official merge module located at Program Files (x86)\Common Files\Merge Modules\Microsoft_VC140_CRT_x64.msm, the Visual C++ 2015 CRT consists of these files:

api-ms-win-core-console-l1-1-0.dll
api-ms-win-core-datetime-l1-1-0.dll
api-ms-win-core-debug-l1-1-0.dll
api-ms-win-core-errorhandling-l1-1-0.dll
api-ms-win-core-file-l1-1-0.dll
api-ms-win-core-file-l1-2-0.dll
api-ms-win-core-file-l2-1-0.dll
api-ms-win-core-handle-l1-1-0.dll
api-ms-win-core-heap-l1-1-0.dll
api-ms-win-core-interlocked-l1-1-0.dll
api-ms-win-core-libraryloader-l1-1-0.dll
api-ms-win-core-localization-l1-2-0.dll
api-ms-win-core-memory-l1-1-0.dll
api-ms-win-core-namedpipe-l1-1-0.dll
api-ms-win-core-processenvironment-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-1.dll
api-ms-win-core-profile-l1-1-0.dll
api-ms-win-core-rtlsupport-l1-1-0.dll
api-ms-win-core-string-l1-1-0.dll
api-ms-win-core-synch-l1-1-0.dll
api-ms-win-core-synch-l1-2-0.dll
api-ms-win-core-sysinfo-l1-1-0.dll
api-ms-win-core-timezone-l1-1-0.dll
api-ms-win-core-util-l1-1-0.dll
api-ms-win-crt-conio-l1-1-0.dll
api-ms-win-crt-convert-l1-1-0.dll
api-ms-win-crt-environment-l1-1-0.dll
api-ms-win-crt-filesystem-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-locale-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-multibyte-l1-1-0.dll
api-ms-win-crt-private-l1-1-0.dll
api-ms-win-crt-process-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-time-l1-1-0.dll
api-ms-win-crt-utility-l1-1-0.dll
concrt140.dll
msvcp140.dll
ucrtbase.dll
vccorlib140.dll
vcruntime140.dll