sodcalculator

10 Tech How-To

Fix msvcp140.dll Missing Errors on Windows

Guide 10-34314 · Updated · Step by step

If you’re seeing an error like “The code execution cannot proceed because msvcp140.dll was not found” when launching a game or application, your system is missing a required Microsoft Visual C++ runtime library. This guide walks you through the most reliable fixes, from installing the correct redistributable to repairing system files, so you can get your software running again.

What You’ll Need

  • An administrator account on your Windows PC (to install software and run system commands).
  • A stable internet connection to download updates and the official Microsoft redistributable.
  • Optional: The original installer for the application that’s failing, in case you need to repair it.

Step-by-Step

  1. Restart your computer. A simple restart can clear temporary glitches that sometimes cause DLL errors. If the error persists, continue.
  2. Install the latest Microsoft Visual C++ Redistributable. The most common cause of msvcp140.dll errors is a missing or outdated Visual C++ runtime. Go to the official Microsoft website and search for “Latest supported Visual C++ Redistributable downloads.” Download the x64 version (and the x86 version too, if you run 32-bit applications) and run the installer. Accept the license terms and follow the prompts. After installation, restart your PC and test the application.
  3. Repair the Visual C++ Redistributable. If the error persists after installation, the existing installation may be corrupted. Open Control Panel > Programs and Features (or Apps & Features in Settings). Scroll down to the Microsoft Visual C++ entries (they start with “Microsoft Visual C++ 2015-2022 Redistributable”). Right-click on each one and select Change (or Repair from the installer). Follow the prompts to repair it. Repeat for both x64 and x86 versions if present.
  4. Run the System File Checker (SFC). Windows can verify and restore corrupted system files. Open Command Prompt as administrator (type “cmd” in the Start menu, right-click it, and choose “Run as administrator”). Type sfc /scannow and press Enter. Wait for the scan to finish (it may take 10-15 minutes). If it finds issues, it will attempt to fix them automatically. Restart your PC afterward.
  5. Run the Deployment Image Servicing and Management (DISM) tool. If SFC doesn’t help, run DISM to repair the Windows system image. In the same administrator Command Prompt, type DISM /Online /Cleanup-Image /RestoreHealth and press Enter. This can take up to 30 minutes. Once done, restart and try again.
  6. Update Windows. Ensure your Windows is fully updated. Go to Settings > Update & Security > Windows Update and click Check for updates. Install all pending updates, including optional ones that may include runtime libraries.
  7. Reinstall the application that shows the error. Sometimes the app’s installation is incomplete or its local files are corrupted. Uninstall the program from Control Panel > Programs and Features, then reinstall it from the original installer or download it again. This will restore any missing DLLs that the app may have installed in its own folder.
  8. Manually copy the DLL (last resort). If you have another PC that runs the app fine, you can copy the msvcp140.dll file from C:\Windows\System32 (or C:\Windows\SysWOW64 for 32-bit) on the working PC to the same folder on the affected PC. This is not recommended as a permanent fix—it’s better to install the redistributable—but it can get you running temporarily. Always back up the existing file first.

Common Mistakes

  • Downloading DLLs from random websites. These files can be outdated, infected with malware, or the wrong version. Always use the official Microsoft redistributable.
  • Installing only the 64-bit version when you also run 32-bit apps. Many applications are 32-bit even on 64-bit Windows. Install both x86 and x64 redistributables to cover all bases.
  • Skipping the restart after installation. Some DLLs are only registered during a reboot. Always restart after installing or repairing the redistributable.
  • Ignoring Windows updates. Cumulative updates often include fixes for runtime components. Keeping Windows up to date prevents many DLL errors.
  • Assuming the DLL is from the app itself. msvcp140.dll is a system-wide component, not part of the application. Reinstalling the app alone rarely fixes the root cause.

Tips

  • Use the Visual C++ Redistributable for Visual Studio 2015-2022 package. It’s a single installer that covers all versions from 2015 onward.
  • If you’re a developer, install the redistributable as part of your application’s installer to avoid this issue for your users.
  • Check if the error appears only in a specific program. If so, the program might require an older version of the runtime. Try installing the 2013 or 2012 redistributable as well.
  • Use the Event Viewer (Windows Logs > Application) to see the exact error details. This can help identify if the DLL is missing or if it’s a different issue like a corrupted dependency.

Troubleshooting

If you’ve followed the steps above and the error persists, consider these additional checks:

  • Check for conflicting software. Some security or system optimization tools may quarantine or delete DLL files. Temporarily disable such software (or check its quarantine list) and see if the error goes away.
  • Perform a clean boot. Use msconfig to disable all non-Microsoft services and startup items. If the error disappears, a third-party service is interfering. Re-enable services one by one to find the culprit.
  • Verify the DLL is in the right place. Open File Explorer and navigate to C:\Windows\System32 (or C:\Windows\SysWOW64 for 32-bit apps). Look for msvcp140.dll. If it’s missing, the redistributable didn’t install correctly. Try uninstalling and reinstalling it.
  • Check for malware. Run a full system scan with Windows Defender or a reputable third-party antivirus. Malware can sometimes delete or replace system DLLs.
  • If all else fails, perform a system restore. If you have a restore point from before the error started, use System Restore to roll back your system to that state. Search for “Create a restore point” in the Start menu, then click System Restore.

Frequently Asked Questions

What is msvcp140.dll?

It’s a Microsoft Visual C++ runtime library that provides standard C++ functions for applications built with Visual Studio 2015 or later. Without it, those applications can’t start.

Why does the error say “not found” even after I install the redistributable?

This can happen if the installation is corrupted, or if the application is looking for a 32-bit version while you only installed the 64-bit. Try repairing the redistributable and ensure you install both x86 and x64 versions.

Can I just download msvcp140.dll from a DLL site?

It’s strongly discouraged. These sites often host outdated or malicious files. The official Microsoft redistributable is the safe and correct way to get the DLL.

Do I need both x86 and x64 versions?

Yes, it’s best to install both. Even on a 64-bit system, many applications are 32-bit and require the x86 version of the runtime.

Will this fix affect my other programs?

No, installing the Visual C++ redistributable is safe and only adds required runtime files. It won’t harm existing software.

How long does the SFC scan take?

It typically takes 10-15 minutes, but can be longer on slower systems. Let it finish completely; interrupting it can cause further issues.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →