To fix the MSVCP140.dll missing error on Windows Server, install or repair Microsoft’s current Visual C++ v14 Redistributable instead of downloading a loose DLL file. The process usually takes about 10 minutes and restores applications built with Visual C++ 2015 or later.
Prerequisites
- Windows Server 2016, 2019, 2022, or 2025, with Desktop Experience or Server Core.
- A local administrator account over RDP, or administrator access through the VPS control panel’s VNC Console if RDP is unavailable.
- Internet access from the server, enough temporary disk space for the installers, and permission to restart the affected application or server.
- The application’s installer or vendor support package, in case the program itself needs repair after the runtime is restored.
- A VPSLake Windows RDP server if you need a Windows environment for this fix.
Step 1: Check the server architecture and application type
The runtime must match the program’s architecture; a 32-bit application needs the x86 package even when Windows Server is 64-bit.
Open Windows PowerShell → Run as administrator. Check the operating system architecture and the installed Visual C++ runtime entries:
[Environment]::Is64BitOperatingSystem
Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64','HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x86' -ErrorAction SilentlyContinue | Select-Object PSPath,Version,Installed
On a 64-bit server, the first command returns True. The registry command may return no entry or an entry with Installed set to 1; a missing x86 entry does not mean the x64 entry can serve a 32-bit application.
If you do not know the program’s bitness, install both x64 and x86 packages in Step 3 on a 64-bit server. On a 32-bit server, install only x86. The program’s vendor documentation or executable properties can identify a less common architecture-specific requirement.
Step 2: Download the official redistributable installers
Use Microsoft’s permanent download links so the runtime is signed and serviced through the supported package rather than an untrusted DLL mirror.
Microsoft’s latest supported Visual C++ Redistributable downloads provide the current v14 packages. In elevated PowerShell, download both packages to a temporary folder on a 64-bit server:
$DownloadDirectory = Join-Path $env:TEMP 'vc-redist'
New-Item -Path $DownloadDirectory -ItemType Directory -Force | Out-Null
if ([Environment]::Is64BitOperatingSystem) { Invoke-WebRequest -Uri 'https://aka.ms/vc14/vc_redist.x64.exe' -OutFile (Join-Path $DownloadDirectory 'vc_redist.x64.exe') }
Invoke-WebRequest -Uri 'https://aka.ms/vc14/vc_redist.x86.exe' -OutFile (Join-Path $DownloadDirectory 'vc_redist.x86.exe')
Get-ChildItem -Path $DownloadDirectory -Filter 'vc_redist.*.exe' | Select-Object Name,Length
On a 64-bit server, expected output contains two executable files with non-zero sizes:
Name Length
---- ------
vc_redist.x64.exe <file size>
vc_redist.x86.exe <file size>
On a 32-bit server, download only vc_redist.x86.exe; skip the x64 command. Do not use a standalone MSVCP140.dll download or copy a DLL from another computer; the installer places the matching runtime files and registration data together.
Step 3: Install or repair the Visual C++ runtime
The installer can update an older compatible runtime or add a missing architecture without changing the application’s files.
Run the packages silently but keep automatic restart disabled, so you can save work before rebooting. This block installs x86 on every server and adds x64 when the operating system is 64-bit:
$DownloadDirectory = Join-Path $env:TEMP 'vc-redist'
$Installers = @((Join-Path $DownloadDirectory 'vc_redist.x86.exe'))
if ([Environment]::Is64BitOperatingSystem) { $Installers += (Join-Path $DownloadDirectory 'vc_redist.x64.exe') }
foreach ($Installer in $Installers) {
$Result = Start-Process -FilePath $Installer -ArgumentList '/install','/passive','/norestart' -Wait -PassThru
[pscustomobject]@{ Installer = (Split-Path $Installer -Leaf); ExitCode = $Result.ExitCode }
}
An exit code of 0 means the package installed or was already current. 3010 means the operation succeeded but Windows should be restarted; 1638 generally means a newer compatible package is already installed. Microsoft’s Visual C++ deployment documentation describes /install, /repair, /passive, and /norestart.
If the installer reports that the package is already present but the application still fails, repair it graphically: open Control Panel → Programs → Programs and Features, select the matching Microsoft Visual C++ Redistributable entry, choose Change, select Repair, and complete the wizard. Repair both x64 and x86 entries when both are installed.
Restart the affected application after installation. If an installer returned 3010, restart the server from Start → Power → Restart during a maintenance window, or use the VPS control panel’s normal power controls after confirming that no other workload is running.
Step 4: Repair the application if the DLL error remains
Some applications ship additional private dependencies or store a damaged copy of their files, so restoring the shared runtime may not be the last repair required.
Open Control Panel → Programs → Programs and Features, select the affected program, and choose Change, Repair, or Modify if the publisher provides one. If no repair option exists, download the latest installer from the application’s official vendor, close the program, and reinstall it using the vendor’s documented path.
Do not replace MSVCP140.dll inside C:\Windows\System32 or the program folder by hand. A mismatched DLL can create a different startup failure and makes later servicing harder to diagnose.
Step 5: Repair Windows component files when installation fails
If the redistributable cannot install or other Windows components also report missing files, repair the component store first and then run System File Checker.
In elevated PowerShell or Command Prompt → Run as administrator, run:
DISM.exe /Online /Cleanup-Image /RestoreHealth
sfc.exe /scannow
DISM may take several minutes and can use Windows Update to obtain repair files. A successful DISM run ends with:
The restore operation completed successfully.
The operation completed successfully.
SFC may report Windows Resource Protection did not find any integrity violations or that it found and repaired corrupt files. Restart Windows if SFC repaired files, then rerun the redistributable installer and launch the application again. Microsoft explains this order in its Windows image repair guidance.
Verify the repaired runtime
Confirm that the package registration exists for the architecture the application uses, then start the application normally.
On a 64-bit server, run:
Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64','HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x86' -ErrorAction SilentlyContinue | Select-Object PSPath,Version,Installed
Each installed architecture should show a version beginning with 14. and Installed equal to 1:
PSPath Version Installed
------ ------- ---------
...\VC\Runtimes\x64 14.xx.xxxxx 1
...\VC\Runtimes\x86 14.xx.xxxxx 1
Now launch the affected program from its usual shortcut or service manager. It should open without the MSVCP140.dll message. If it is a service, check Server Manager → Tools → Services, start the service, and confirm that its status remains Running after one minute.
Troubleshooting
“MSVCP140.dll was not found” still appears
The program may be 32-bit while only the x64 runtime was installed, or the application may load a private dependency from its own folder. Install or repair x86 as well as x64 on a 64-bit server, restart the program, and use the vendor’s installer if the error is limited to one application.
“A newer version is already installed” or exit code 1638
Windows has found a newer compatible v14 package, so installing an older copy is unnecessary and may be blocked. Open Control Panel → Programs → Programs and Features, repair the installed Microsoft Visual C++ entry, then restart the application instead of downgrading the runtime.
The error changes to “VCRUNTIME140.dll” or “VCRUNTIME140_1.dll”
These files are part of the same Visual C++ runtime family. Repair the matching x86 or x64 Redistributable, depending on the application’s architecture, and reinstall the application only if its own files are damaged.
The redistributable installer fails with error 1603
A pending reboot, damaged Windows Installer state, insufficient permissions, or security software can interrupt the setup. Restart Windows, run the Microsoft installer again from an elevated PowerShell window, and review the newest VC Redist log in %TEMP%; do not disable security controls or download a replacement DLL.
FAQ
Do I need both x86 and x64 packages on a 64-bit Windows Server?
Usually, yes. Windows can run 32-bit applications on a 64-bit system, and those applications load the x86 runtime; 64-bit applications load the x64 runtime. Installing both avoids guessing when the application architecture is unclear.
Is MSVCP140.dll the same as the Visual C++ Redistributable?
MSVCP140.dll is one library supplied by the Visual C++ runtime package. The redistributable also installs related libraries and servicing information, so installing the complete Microsoft package is safer than copying that single file.
Can I download MSVCP140.dll from a DLL website?
No. Third-party DLL sites may provide a modified, mismatched, or malware-infected file, and the file alone does not repair the runtime installation. Use Microsoft’s signed redistributable package or the application’s official installer.
Why does the error appear after a Windows Server update?
An update can expose a previously incomplete runtime installation, replace damaged component files, or leave an application using a different architecture than expected. Check both runtime entries, repair the relevant package, and then repair the application if only that program still fails.