How to Fix the ‘msvcp140.dll is Missing’ Error
The dreaded “msvcp140.dll is missing” error can stop you from running your favorite applications. This error indicates that a crucial component of the Visual C++ Redistributable package is either missing, corrupted, or not correctly registered on your Windows system. This guide provides several methods to resolve this issue, ensuring your programs run smoothly again.
Understanding the Error
The msvcp140.dll file is part of the Microsoft Visual C++ Redistributable package, which provides runtime components required to run C++ applications developed using Visual Studio. When an application requires this DLL and it’s not found, the error message pops up, preventing the program from launching.
Solutions to Fix the msvcp140.dll Error
Here are several methods to fix the msvcp140.dll error, progressing from the simplest to more advanced techniques:
1. Restart Your Computer
Sometimes, a simple restart can resolve the issue. A restart clears temporary files and processes that might be interfering with the DLL. This is always a good first step in troubleshooting any computer problem.
2. Repair or Reinstall the Microsoft Visual C++ Redistributable
This is the most common and effective solution. The steps vary slightly depending on your Windows version:
Steps:
- Open Programs and Features: Press
Win + R, typeappwiz.cpl, and press Enter. - Locate Microsoft Visual C++ Redistributable Packages: Look for entries like “Microsoft Visual C++ 2015-2019 Redistributable (x64)” or similar. You might see multiple versions.
- Repair: Right-click on each entry and select “Change,” then click “Repair” in the window that appears. If a repair option isn’t available, skip to the reinstall step.
- Reinstall (if repair doesn’t work): If repairing doesn’t work, right-click and select “Uninstall.” After uninstalling, download the latest version from the Microsoft website (link provided below).
- Download the Latest Version: Go to the official Microsoft website:
- Install: Run the downloaded installer and follow the on-screen instructions. Ensure you install both the x86 and x64 versions if you’re on a 64-bit system.
3. Copy the DLL from Another Computer (Use with Caution)
Warning: This method should be used with caution as it involves downloading DLL files from the internet, which can be a security risk. Ensure you download the file from a trusted source. If you have another computer with the same Windows version and the application runs correctly, you can copy the msvcp140.dll file from that computer.
Steps:
- Locate the DLL: On the working computer, navigate to
C:\Windows\System32orC:\Windows\SysWOW64(for 32-bit applications on a 64-bit system) and find themsvcp140.dllfile. - Copy the File: Copy the file to a USB drive or network location.
- Paste the File: On the affected computer, paste the file into the corresponding directory (either
C:\Windows\System32orC:\Windows\SysWOW64). - Register the DLL (if needed): Open Command Prompt as administrator (search for “cmd”, right-click, and select “Run as administrator”). Type
regsvr32 msvcp140.dlland press Enter. If the DLL is in SysWOW64, you might need to navigate to that directory in the command prompt first.
4. Run System File Checker (SFC)
The System File Checker (SFC) is a utility in Windows that allows users to scan for and restore corrupt Windows system files.
Steps:
- Open Command Prompt as Administrator: Search for “cmd”, right-click, and select “Run as administrator.”
- Run SFC Scan: Type
sfc /scannowand press Enter. The scan will take some time to complete. - Restart Your Computer: After the scan is complete, restart your computer.
5. Check for Malware
Malware can sometimes corrupt or delete DLL files. Run a full system scan with your antivirus software.
Steps:
- Update Your Antivirus Software: Ensure your antivirus software is up to date.
- Run a Full System Scan: Perform a full system scan to detect and remove any malware.
6. Reinstall the Application
If the error only occurs with a specific application, try reinstalling that application. This will ensure that all necessary files and dependencies are correctly installed.
Steps:
- Uninstall the Application: Go to Programs and Features (appwiz.cpl), locate the application, and uninstall it.
- Download the Latest Version: Download the latest version of the application from the official website.
- Install the Application: Reinstall the application, following the on-screen instructions.
Preventing Future Errors
- Keep Windows Updated: Regularly update your Windows operating system to ensure you have the latest security patches and system files.
- Install Software Correctly: Always install software from trusted sources and follow the installation instructions carefully.
- Maintain Your System: Regularly run maintenance tasks such as disk cleanup and defragmentation to keep your system running smoothly.
By following these steps, you should be able to resolve the “msvcp140.dll is missing” error and get your applications running again. Remember to proceed with caution when downloading DLL files from the internet and always prioritize security.