windowstroubleshootingsoftware

MSVCP140.dll Is Missing? Fix It the Right Way

TG By The TechFix Guide Editorial Team  ·  Published  ·  Last reviewed  ·  How we check our guides
An open laptop on a desk at night with a soft desk lamp, the screen showing a blurred dialog window

Half of the programs on a typical Windows PC were built with the same development toolkit - Microsoft Visual C++ - and they all depend on a small set of shared files that Windows does not ship by default. When one of those files is absent, damaged, or the wrong architecture, the application refuses to start and Windows hands you a message like "The code execution cannot proceed because MSVCP140.dll was not found" or "VCRUNTIME140.dll is missing from your computer. Try reinstalling the program". The wording makes it sound like a single file went missing, as if you could download it, drop it in a folder, and move on. That instinct is understandable and it is the fastest way to turn a small problem into a security incident.

The error is really a message about the Visual C++ Redistributable, a free Microsoft installer that places a matched set of DLLs on the system. Fixing it properly takes about ten minutes, does not require touching the registry, and survives future updates. This guide covers every common variant of the error, the exact installer to use, what to do when the file is already present but the app still refuses to start, and the traps that "download this DLL" websites set.

What the Error Actually Means

The DLLs named in these errors - MSVCP140.dll, VCRUNTIME140.dll, VCRUNTIME140_1.dll, MSVCP140_1.dll and MSVCP140_2.dll - all belong to the Visual C++ 2015-2022 Redistributable. Applications built with Visual Studio 2015, 2017, 2019, or 2022 share this set, which is why a program that worked yesterday can fail after you uninstall an unrelated game: some uninstallers remove the redistributable if no other installed program claims to need it, and the next app to start finds the shelf empty.

Three facts matter for the fix. First, the file must match the architecture of the application, not of your enthusiasm: a 32-bit program needs the 32-bit (x86) DLL even on a 64-bit Windows, so a complete fix usually means installing both the x64 and x86 packages. Second, copying a lone DLL into System32 or into the program folder frequently masks the error while breaking other parts of the runtime, because a single file from an unknown source is almost never a matched set and may be malware outright. Third, there is no per-application licence issue here - the redistributable is free, and Microsoft's installer decides exactly which files your Windows build needs.

Step 1: Read the Exact Error and Identify the App

Write down the exact DLL name and the program that produced it, because the variant tells you how deep the repair needs to go:

Error textWhat it points toFirst action
MSVCP140.dll not found / missingVisual C++ 2015-2022 runtime, C++ standard library portionInstall or repair the VC++ redistributable (Step 2)
VCRUNTIME140.dll not foundSame package, runtime support portionSame as above
VCRUNTIME140_1.dll not foundSame package, x64 exception-handling portion; appears with newer buildsSame as above - the 2015-2022 package includes it
MSVCP140.dll is either not designed to run on Windows or contains an errorA wrong-architecture or corrupted copy, often one that was pasted into System32Install both x64 and x86 packages, then repair the app
Error appears only for one app, everything else fineThe app's own install is broken, not the systemReinstall that app after Step 2

The last row is worth pausing on. If several programs complain, the system-level fix applies. If exactly one program complains and every other app built on the same toolkit runs fine, the system files are intact and reinstalling that one program is both faster and more reliable than any system surgery.

Step 2: Install the Visual C++ Redistributable

Open a browser and download Microsoft's redistributable installer. The stable permanent links are https://aka.ms/vs/17/release/vc_redist.x64.exe for 64-bit and https://aka.ms/vs/17/release/vc_redist.x86.exe for 32-bit - both resolve to the current Visual Studio 2015-2022 package on Microsoft's servers. Download both, even on a 64-bit machine, because plenty of long-lived applications (older games, utilities, printer software) are still 32-bit.

Run vc_redist.x64.exe first. You will see a short licence screen and an Install button; the installer either installs fresh files, or - if the package is already present - offers Repair. Choose Repair in that case: it verifies and replaces every DLL in the set without uninstalling anything. When it finishes, it asks for a restart, and you should actually restart rather than clicking "later", because running processes keep the old files locked. Then run vc_redist.x86.exe and do the same.

If the installer reports "Another installation is in progress", wait a few minutes and retry; if it reports a problem and rolls back, note the error code it shows - 0x80070666 is the common one and means the installer thinks a newer version is already present, which moves you to Step 3 instead of endless retries.

Try the failing application now. In the large majority of cases the program opens normally and the repair is finished. If the error persists, continue - each remaining step handles a narrower case.

A monitor in a dim room showing a command prompt window with monospaced text, keyboard in the foreground
Repair installs and system file checks are all done from a handful of commands - if the redistributable repair alone does not clear the error, this is where the next hour goes.

Step 3: When the File Exists but the App Still Fails

Check whether the DLL is actually registered on the system: open File Explorer and look in C:WindowsSystem32 for MSVCP140.dll and VCRUNTIME140.dll. On a 64-bit Windows, System32 holds the 64-bit copies and C:WindowsSysWOW64 - counterintuitively - holds the 32-bit ones. If both exist in both folders, the runtime is installed and the fault sits with the application. Three fixes, in order of increasing effort:

  • Repair the application. Go to Settings > Apps > Installed apps, find the program, open its three-dot menu, and choose Modify or Repair if offered. Games on Steam verify their own files: right-click the game in your library, choose Properties > Installed Files > Verify integrity of game files, and let Steam re-fetch anything damaged.
  • Repair system files. Right-click Start, choose Terminal (Admin) or Command Prompt (Admin), and run sfc /scannow. It takes 5 to 15 minutes and reports either "did not find any integrity violations" or a list of repaired files. Follow it with DISM /Online /Cleanup-Image /RestoreHealth if SFC says it found corruption it could not fix.
  • Reinstall the application cleanly. Uninstall, restart, install again from the original source. If the installer itself crashes with the same DLL error, run the redistributable repair once more immediately before it - some installers check for the runtime before their own files are in place.

Step 4: Why "Download the DLL" Sites Make Everything Worse

The search results that surround this error are dominated by sites offering MSVCP140.dll as a single download. Resist them for three concrete reasons. First, security: a bare DLL runs with the full permissions of whatever loads it, and there have been documented campaigns that used popular DLL names to distribute malware - you cannot verify a random file is the genuine Microsoft build without signature-checking it, which most people never do. Second, incompleteness: the runtime is a matched set of files plus registry entries that tell Windows where they live; a hand-copied MSVCP140.dll without its matching VCRUNTIME140.dll and the rest produces a new error one dialog later. Third, wrong architecture: grabbing a 64-bit file for a 32-bit application produces the "not designed to run on Windows" variant, which then sends people deeper into the DLL-download maze.

If a DLL-copy has already been tried before you got here, undo it: delete the copied file from System32, SysWOW64, or the program folder (keep a note of where it was), then run the redistributable repair so the genuine files and their registrations are restored. If you are worried the copy came from a bad source, the malware cleanup guide on this site covers a full scan-and-verify pass.

Edge Cases Worth Knowing

  • The error appears after a Windows update. Rarely, an in-place upgrade leaves the runtime intact but breaks an app's registration. The redistributable repair plus an app repair resolves it; a clean reinstall of the runtime (Uninstall both packages in Settings > Apps, restart, install both again) is the fallback.
  • Portable apps and older games. Some programs ship their own runtime files in their folder. If the error names a DLL that exists in the program's own directory, the copy there is damaged - verify files through the launcher, or reinstall, rather than pointing the system at it.
  • 0xc000007b on launch. A related but different failure: the app launched but mixed 32-bit and 64-bit DLLs. Installing both redistributable packages and repairing the app resolves nearly every case; a leftover copied DLL is often the root cause.
  • Multiple redistributable versions listed in Apps. You may see Visual C++ 2013, 2015-2022, and older entries side by side. That is normal - they coexist by design. Never uninstall the older ones to "clean up"; plenty of software still loads them.

If Nothing Above Works

Two remaining possibilities cover the rest. A stuck Windows component store can keep even a healthy installer from replacing files: run DISM /Online /Cleanup-Image /RestoreHealth, restart, then repeat the redistributable repair - this combination resolves the 0x80070666 loop in most instances. And if the error appears for a program that came from the Microsoft Store, reset it instead: Settings > Apps > Installed apps > (the app) > Advanced options > Reset, which rebuilds its files from the store package.

Log the outcome before moving on: the exact error text, whether both redistributable packages repaired successfully, and the SFC result. If the machine later develops a broader refusal to run software, that record tells you the runtime was verified healthy on this date and the search should move to the application side. For adjacent startup failures, the diagnostics in the "this app can't run" guide and the Safe Mode walkthrough are the natural next reads, and the Windows Update repair guide covers the component-store side in depth.

Editorial review

First published
Last reviewed
Applies to
Windows 10 22H2 and Windows 11 through 24H2
Reviewed by
The TechFix Guide editorial team

First published. Verified the aka.ms redistributable links resolve to the current 2015-2022 package, the Repair flow wording, the System32/SysWOW64 layout, and the SFC and DISM command syntax.

Menu paths, option names and file paths in this guide were checked against the version named above. We do not claim to have tested every brand of hardware, so if your build shows something different, tell us and we will correct the page. How we check our guides  ·  Report an error