Bon Bon - 11 months ago 208
C++ Question

vcruntime140.dll vs vcruntime140d.dll

What are the difference between these two dlls vcruntime140.dll and vcruntime140d.dll? Why do we need them? Are they both part of the Microsoft Visual C++ 2015 Redistributable?

Have googled for quite some time, but couldn't find anything that I can understand.

Some background: I have a C# program that works on a Windows 10 machine but doesn't work on Windows Vista, and looks like it is because there is no vcruntime140d.dll on my Windows Vista machine.

Answer Source

Although I couldn't find anything authoritative on Microsoft's site, they have always shipped two of each DLL:

  • a release version which does NOT end with a d - for example: vcruntime140.dll
  • a debug version which ends with a d - for example: vcruntime140d.dll

You need to use the right one because the library that the compiler uses is picked based on whether the project is built with debug or release settings. So if you compile with release settings the executable will use vcruntime140.dll and if you compile with debug settings the executable will use vcruntime140d.dll