question

simonx-0248 avatar image
0 Votes"
simonx-0248 asked cooldadtx commented

How can I find out which VC_redist.x86.exe to use?

Hi - my application is built using Visual Studio 2019 C++. It is 32-bit. I run VC_redist.x86.exe to install the appropriate required MS DLLs (I'm assuming x86 is the one to use for a 32-bit app - is that right?). However I can't find out how I'm supposed to know which version of this exe to use. The one I'm currently distributing is "Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.24.28127". I recently stumbled upon a more recent one which is 14.28.29325. I want to use that one as it seems more recent. But first I wanted to 100% confirm that it is the right one to use. After a lot of searching, I found this page: https://docs.microsoft.com/en-us/cpp/windows/determining-which-dlls-to-redistribute?view=msvc-160

It says: "The major version number of the redistributable package you deploy must match the version of the Visual Studio toolset used to create your application, and the minor version must be the same or higher. "

I presume that 'toolset' means "platform toolset". The platform toolset I use is "Visual Studio 2019 (142)". The Windows SDK version is 10.0. So I presume that the major version of "14.28.29325" is 14 and the minor version is 18 - is that right? So how am I supposed to work out from those numbers whether I can use this package or not?

All help much appreciated.

vs-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

cooldadtx avatar image
0 Votes"
cooldadtx answered cooldadtx commented

The platform toolset in your build settings corresponds to the runtime. v140 indicates v14 runtime with minor update of at least 0. v142 indicates v14 runtime with minor update of at least 20. The corresponding redists are 14.0 and 14.20 or higher. If you are targeting the platform toolset v142 (VS 2019) then you'd need at least the .20 version of v14 runtime or 14.20+. Any version less than this won't work properly. If you install a major version (v15) higher than this then it won't work either. The download page for VS 2019 has the latest redist you can use.

Note that since VS 2015 C++ has been using the same v14 runtime. Therefore all versions of VS 2015, 2017 and 2019 use the same C++ runtime. The only difference is that newer VS versions have required updated versions hence the v141 and v142 updates. You only need one version of the v14 runtime and ideally it should be the latest version. All C++ apps from VS 2015 and on can use the same runtime. If you're using the platform toolset v142 then your installer should ensure that at least 14.20 is installed.

At some point MS will ship a version of VS that requires the v150 runtime. At that point they will release a new runtime with version 15.0xyz but until then they are just releasing minor updates to the v14 runtime.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you very much for that very helpful answer. Is that information available somewhere on an MS web page? I haven't seen it anywhere.

0 Votes 0 ·

Some of it is available here.

0 Votes 0 ·

OK thank you.

0 Votes 0 ·
abbodi86-0005 avatar image
0 Votes"
abbodi86-0005 answered

Just install the latest
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

https://devblogs.microsoft.com/cppblog/binary-compatibility-and-pain-free-upgrade-why-moving-to-visual-studio-2017-is-almost-too-easy/

Any binaries built with MSVC v141 toolset will link against the 140 version of the VC Runtime. The VCRedist is only backward compatible, so you will need to redistribute the latest VCRedist 140 available in VS 2017 with your app.

this apply to VS 2019 too


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.