Prose Hitman Jul 14, 2022 @ 9:28am
Fixing Stubborn MSVCP140.dll and VCRUNTIME140.dll errors.
This is just an informational (hopefully helpful) post for those who have recurring or hard to solve .dll problems with dll’s like VCRUNTINE140.dll and MSVCP140.dll. I am sure that many of you already know this but for those who do not, well here you go…

This is a slightly advanced and risky process so be sure you are comfortable with installing/reinstalling things like dll modules and software, Use this advise AT YOUR OWN RISK but be careful I am trying to help fix machines not break them.

I am a retired mainframe (old school stuff) Dev/Prog/Analyst with more than a few years of PC experience also so now you know who this is coming from and put whatever value you like on it.
Now on to the issue.

After buying a new win 11 pro, i9 12th Gen RTX 3070ti gamer laptop, I came across the above mentioned problem. For several days the solution was evasive to me.

The problem started with the installation of some proprietary dev software which required several versions of the Visual C++ Re-Distribution packages (2010 through 2017) The 2017 were already on the machine and the rest were installed. No problems.
When I started installing some games that required the redistribution modules, I ran into the following errors:
“The code execution cannot proceede because MSVCP140.dll was not found. Reinstalling the program may fix this problem”
Same error for VCRUNTIME140.dll file.

So, I reinstalled various software, no change.
Installed Visual C++ Redistributable 2015 thru 2022 package, still get the error.

Anyway long story short.

The error had to do with the specific versions of these dll files.
According to some references that I found there is an apparent conflict between the 2015 and 2017 Vicual C++ dlls that is, apparently, not corrected in the latest group redistribution package (the 2015-2022 all inclusive one).
So here is the solution that worked for me and continues to work ever after installing other games and software.

During the install, re-install processes, don't know why but some of the individual 2015 and 2017 Visual C++ dlls, which were previously installed, were replaced with the group package for the 2015 -2022 dlls. This was the cause.
To correct I had to uninstall all of the redistribution versions on my machine and reinstall the individual years one at a time in order. (DO NOT REBOOT AFTER UNINSTALLING PACKAGES just reinstall each one in order, then reboot). For me it was 2010 thru 2017. Make sure to include 2015 and 2017.

Don’t ask me why, but if you do this and then install the 2015-2022 group redistribution package it leaves behind the separate 2017 module and the 2105-2022 group. The 2015 is replaced.
After that I have had no issues. Fingers crossed.

Now I am sure some of you are laughing at the fact that this was new info to a senior guy, but there it is. If it is helpful, great. If it was amusing then I hope the chuckle improved your day. I am only trying to help those that may need it.

Cheers to all.
Prose.
Last edited by Prose Hitman; Jul 14, 2022 @ 9:32am
< >
Showing 1-15 of 17 comments
Crashed Jul 15, 2022 @ 10:02am 
This normally doesn't happen to me, but I install the 2015-2022 redistributable at https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 both x86 and x64.

The deal with 2015-2022 is that they share the same runtime; Microsoft changed how the runtimes work since Visual C++ 2015. You do need both x86 and x64 platforms because they are specific to the application platform, not just the system platform.
Prose Hitman Jul 15, 2022 @ 12:53pm 
You are correct and it was an error not to mention that both the x86 and x64 needed to be changed. Also I should have mentioned to make a backup.

You are also correct that this is an unusual situation but I have found others with the same issue.
I guess it just depends on what you put on your system.

Anyway, thanks for the correction, I am glad somebody read the post at least.

Cheers.
Tabloid tuesday Jul 15, 2022 @ 1:02pm 
I read and subscribed, having many c+ errors in the past and dumbing the fix repeatedly. would this be associated to launch errors?
Bad 💀 Motha Jul 15, 2022 @ 4:25pm 
If you have 2015 and later installed from older packages; which is hard to put a date on that since some games come with these older packages. However they can run fine of newer packages of the same version it is just that the game files might not have been updated server-side to include them; thus what you have on-Disk with your Game are older "Redist" of these packages in question.

Go to Control Panel > Programs and Files
If you see anything Microsoft Visual C++ 2015 or newer; uninstall of those.
If you have older ones like 2005, 2008, 2010, 2012; leave those alone.

Once all of the 2015 and newer are uninstalled, reboot Windows.
Then download and install the 2015-2022 package from MS website.
Download both the X86 and X64 versions of this. Install both.
Reboot when done.
Then go to Windows Updates and click Check for Updates. As there may be some "hotfixes" available for your Visual C++ Runtimes; install those; reboot when all done. And then you should be good to go.

Also keep in mind that many games don't just require a Visual C++ Runtime, but also NET Framework. Some even require XNA Frameowork. So ensure these are also installed and up to date. Some older games might need XNA 3.0 while some newer games might need XNA 4.0; like the Visual C++ stuff; its perfectly fine to have both versions installed.
Last edited by Bad 💀 Motha; Jul 15, 2022 @ 4:26pm
Crashed Jul 15, 2022 @ 5:30pm 
Originally posted by Bad 💀 Motha:
If you have 2015 and later installed from older packages; which is hard to put a date on that since some games come with these older packages. However they can run fine of newer packages of the same version it is just that the game files might not have been updated server-side to include them; thus what you have on-Disk with your Game are older "Redist" of these packages in question.

Go to Control Panel > Programs and Files
If you see anything Microsoft Visual C++ 2015 or newer; uninstall of those.
If you have older ones like 2005, 2008, 2010, 2012; leave those alone.

Once all of the 2015 and newer are uninstalled, reboot Windows.
Then download and install the 2015-2022 package from MS website.
Download both the X86 and X64 versions of this. Install both.
Reboot when done.
Then go to Windows Updates and click Check for Updates. As there may be some "hotfixes" available for your Visual C++ Runtimes; install those; reboot when all done. And then you should be good to go.

Also keep in mind that many games don't just require a Visual C++ Runtime, but also NET Framework. Some even require XNA Frameowork. So ensure these are also installed and up to date. Some older games might need XNA 3.0 while some newer games might need XNA 4.0; like the Visual C++ stuff; its perfectly fine to have both versions installed.
It should be noted that after rebooting after removing the 2015 and newer runtimes you may find some startup programs not working and throwing DLL errors i.e. vcruntime140.dll not found, but after reinstalling the 2022 redistributables they should start working again.
Prose Hitman Jul 16, 2022 @ 9:50am 
Post deleted by author.
Last edited by Prose Hitman; Jul 17, 2022 @ 5:21pm
Bad 💀 Motha Jul 16, 2022 @ 1:02pm 
But those years, are not versions of files. They are merely the name. A hot fix which is usually available from Windows Updates for many of the various VC++ runtime DLL files would change to a newer version after a hot fix is applied.

Nothing in OS Startup requires VC++ Runtimes. Otherwise WinOS would come with them built in, but it doesn't. You might have 3rd party apps that need them, but that's not something deemed essential
Last edited by Bad 💀 Motha; Jul 16, 2022 @ 1:04pm
Prose Hitman Jul 16, 2022 @ 1:17pm 
Post deleted by author.
Last edited by Prose Hitman; Jul 17, 2022 @ 5:19pm
Bad 💀 Motha Jul 16, 2022 @ 8:25pm 
The names of the files do not change. There is no risks to going into your list of Programs and Features and Uninstalling every single VC++ Runtime as a means of fixing one that might be corrupted. Also and again if you get a VC related error, like when trying to do any VC runtime install, uninstall or repair; this might be related to corrupted NET Framework, since those two things work hand-in-hand together so-to-speak. If any VC runtime or any NET Framework is corrupted it will cause any app that uses those to throw up errors. Now it could be on a version by version basis; again based on what actual one(s) your app may use; but again just keep all of this in mind.

When you install any Windows OS; it does not come "out of the box" with these installed...
> NET / ASP / XNA Frameworks
> RADTools video encoder
> Visual C++ Runtimes
> DirectX Runtimes (it may include some, but not all; for example Win10/11 do not include library runtime files for DX 9.0C and older. This is why games ship/come bundled with the "DirectX 9.0C June 2010 Redist Package"

One OS edition or another might include "some" but not ALL of them; such as NET Framework for example. The rest I can assure you, the OS doesn't have until YOU install them.

Every since Win98, I do not wait for things like Driver Packages or Games to install these, I install them all myself as part of "What to do after clean installing Windows OS"

If you have such installers bundled with games or on a backup drive, do not rely on those down the road. They can get outdated and become obsolete. Many game devs, even though their game might be on a service that makes small updates/changes easy, such as a game being on the Steam servers; many devs never take the time to make changes to the Redist files that a game includes. So if you are letting your Games do these installs, well don't do that. Instead go download and install all of the latest versions of all of these packages yourself and install them. Then when you go to install your games, it will skip over that Redist install process because it sees your OS already has them.

If you are using Win10 or 11, MS does not offer stand-alone installers for NET/ASP Framework; you toggle this On or Off in the OS Features. Then once enabled, your system will receive any updates to those via Windows Update services.
Last edited by Bad 💀 Motha; Jul 16, 2022 @ 8:33pm
Prose Hitman Jul 17, 2022 @ 8:17am 
Post deleted by author.
Last edited by Prose Hitman; Jul 18, 2022 @ 8:23am
m Jul 22, 2022 @ 7:38am 
Posting and hoping for some advice.

Win 11 Home.

I noticed that Steam had updated some redistributes but thought nothing of it.
Now, whenever I play Far Cry 3 or Vampire Survivors when I quit the game I get a cascade of errors, all starting with a missing DLL - both of them in this thread title have appeared.

What i have done:
- uninstalled every Microsoft C++ Redistribute
- rebooted
- downloaded every x86/x64 one by one from https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
- installed both versions of each year before installing the next update
- reboot
- Settings > Windows Update > Check > all is good,
( I have done this multiple times)

I can see that in /system32 the files really are there, yet I quit VS and a few seconds later (it never ever happens when playing) I get the cascade of errors and I have to reboot.

I do not appear to have a System Restore point before the Steam Client updated.

I do not believe this is related at all to the above games - esp with regard to VS as their forum / discord would be flooded and they are not.

This may be down to me not quite understanding this - which is written above:

"Make sure to include 2015 and 2017.

Don’t ask me why, but if you do this and then install the 2015-2022 group redistribution package it leaves behind the separate 2017 module and the 2105-2022 group. The 2015 is replaced."

I only see "Visual Studio 2015, 2017, 2019, and 2022" at the first link I posted.

Thanks for any advice.
Crashed Jul 22, 2022 @ 7:50am 
Originally posted by ♊ markx2 ☀:
Posting and hoping for some advice.

Win 11 Home.

I noticed that Steam had updated some redistributes but thought nothing of it.
Now, whenever I play Far Cry 3 or Vampire Survivors when I quit the game I get a cascade of errors, all starting with a missing DLL - both of them in this thread title have appeared.

What i have done:
- uninstalled every Microsoft C++ Redistribute
- rebooted
- downloaded every x86/x64 one by one from https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
- installed both versions of each year before installing the next update
- reboot
- Settings > Windows Update > Check > all is good,
( I have done this multiple times)

I can see that in /system32 the files really are there, yet I quit VS and a few seconds later (it never ever happens when playing) I get the cascade of errors and I have to reboot.

I do not appear to have a System Restore point before the Steam Client updated.

I do not believe this is related at all to the above games - esp with regard to VS as their forum / discord would be flooded and they are not.

This may be down to me not quite understanding this - which is written above:

"Make sure to include 2015 and 2017.

Don’t ask me why, but if you do this and then install the 2015-2022 group redistribution package it leaves behind the separate 2017 module and the 2105-2022 group. The 2015 is replaced."

I only see "Visual Studio 2015, 2017, 2019, and 2022" at the first link I posted.

Thanks for any advice.
The newest redistributable should replace 2015, 2017, and 2019 of the same processor platform. Perhaps on some systems the x64 redist is a bit glitchy after they included the ARM64 binaries in the x64 package?
Bad 💀 Motha Jul 22, 2022 @ 8:29am 
How is that buggy? If it does include stuff for ARM systems, this can't affect you in any ways since that would not apply to your system.

The new package covers all VC++ runtimes for 2015-2022 however before you install the x86 and x64 versions of newer said package, it is best to first go to Programs and Features and then uninstall everything to do with Microsoft Visual C++ 2015 and later. Once all of those are removed, Restart Windows and then install the new 2015-2022 packages, both the X86 and X64

If you get a problem with one of your OS Startup apps launching due to removal of VC++ runtimes, just ignore that. It should go away once you install the new packages and restart once more.
Last edited by Bad 💀 Motha; Jul 22, 2022 @ 8:31am
Crashed Jul 22, 2022 @ 8:59am 
Originally posted by Bad 💀 Motha:
How is that buggy? If it does include stuff for ARM systems, this can't affect you in any ways since that would not apply to your system.

The new package covers all VC++ runtimes for 2015-2022 however before you install the x86 and x64 versions of newer said package, it is best to first go to Programs and Features and then uninstall everything to do with Microsoft Visual C++ 2015 and later. Once all of those are removed, Restart Windows and then install the new 2015-2022 packages, both the X86 and X64

If you get a problem with one of your OS Startup apps launching due to removal of VC++ runtimes, just ignore that. It should go away once you install the new packages and restart once more.
I only say that in case they made a mistake when integrating ARM64. I do still for my own projects distribute the latest appropriate redist and the ARM64 content might just be a blessing since it idiot proofs installation of the 64-bit runtimes on those systems, as on Windows 11 the ARM64 DLLs to the best of my knowledge are compiled to be compatible with x64 apps in the x64 emulation mode; they have both ARM64 and ARM64EC ABIs, the latter of which is compatible with ARM64EC and x64 apps.
Last edited by Crashed; Jul 22, 2022 @ 9:00am
Bad 💀 Motha Jul 22, 2022 @ 9:08am 
Just like many driver packages over the years; when you downloaded them included all the files need for both a 32bit OS and a 64bit OS. Over time most companies separate these to help cut down on the full download size. With more and more people over time using a 64bit OS, it didn't make sense to include both types of files in a single package because it most likely be double the size when it didn't need to be, since most would only need the stuff related to 64bit.

However by my app or driver package having both sets of files to cover both a 32bit OS and a 64bit OS; files that aren't needed don't affect the user or present problems. For example if I'm on a 64bit OS and install a Driver Package that includes both types of files, only the 64bit ones apply to my system, the other files would just sit loosely and not be used.

When you install something like VC++ Runtimes however, you need BOTH X86 and X64 versions of the runtime packages. Because a Game might only use the X86 version, while another Game might use the X64 version; some games might actually require BOTH. Some DRM launchers also use BOTH. An example of this is with games like CyberPunk 2077 or Horizon Zero Dawn. They require both the X86 and X64 versions of the VC++ Runtimes; as well as your NET Framework being up to date; IIRC I think they require NET Framework 4.8 or later. Otherwise the game can't even launch.
< >
Showing 1-15 of 17 comments
Per page: 1530 50

Date Posted: Jul 14, 2022 @ 9:28am
Posts: 17