C# Missing MSVCR100.dll

CeccoCQ picture CeccoCQ · Aug 5, 2011 · Viewed 39k times · Source

I'm developing an app that execute another app and I received this error:

the program can't start because MSVCR100.dll is missing from your computer

with my C# app, can I fix this problem copying this .dll into windows/system32 folder? Or exists another method to do this?

Answer

selbie picture selbie · Aug 6, 2011

This links below point to the proper downloads for the MSVCRT100 installer. This is likely what you want your customers to run before installing your app. This will properly install the MSVCRT DLLs in the proper directory such that all applications can use it.

Microsoft Visual C++ 2010 Redistributable Package (x86) (probably what you need for 32-bit and 64-bit os)

Microsoft Visual C++ 2010 Redistributable Package (x64) (Only if your app itself is 64-bit)

If you actually want to install the MSVCRT100 DLLs through a merge module within your own MSI - you can link your MSI to the MSMs that are located in the x86 version your "c:\program files\common files\merge modules" directory" (Assuming you have Visual Studio 2010 installed).

C:\Program Files (x86)\Common Files\Merge Modules>dir *CRT*.msm
 Volume in drive C has no label.
 Volume Serial Number is 60A4-1718

 Directory of C:\Program Files (x86)\Common Files\Merge Modules

04/22/2011  01:18 PM           584,192 Microsoft_VC100_CRT_x64.msm
04/22/2011  01:41 PM           571,904 Microsoft_VC100_CRT_x86.msm  <-- This is likely the MSM you want if your app is 32-bit.
04/22/2011  01:14 PM           847,360 Microsoft_VC100_DebugCRT_x64.msm
04/22/2011  01:39 PM           801,792 Microsoft_VC100_DebugCRT_x86.msm

Two other alternatives: Instead of copying MSVCRT100.dll into a system directory, copy it into the directory of the EXE app you are trying to launch that depends on this DLL. This isn't recommended, but won't run the risk of breaking other apps.

Another alternative. If you actually have the source code to the EXE that you are trying to launch, you can completely bypass all of this "install msvcrt100.dll" noise by just statically linking to it. In visual studio, it's the option in the project's propery dialog under C/C++ (under the Code Generation tab). Change "runtime library" from "Multi-threaded Dll" to just "Multi-threaded". This adds the /MT compiler switch.