visual-c++runtimeredistributable

Microsoft Visual C++ runtime versions? Do I need to keep 'em all?


I've been looking around and I'm not sure I see a clear answer to this so I'm sorry if this has been asked before; my "Google-Fu" is failing me.

We are developing software against .NET Framework but historically we have had to include a number of 3rd party components. Also, historically, these tended to come with various dependencies on Microsoft Visual Studio C++ runtime versions. This has led to us distributing as part of our initial installation process:

Microsoft Visual Studio C++ 2005 Redistributable (SP1) - build 8.0.61001
Microsoft Visual Studio C++ 2008 Redistributable       - build 9.0.30729.6161
Microsoft Visual Studio C++ 2010 Redistributable       - build 10.0.40129
Microsoft Visual Studio C++ 2012 Redistributable       - build 11.0.61030

But as the years have gone on many of the 3rd party components we used have been replaced with newer and better ones, and we include them to our Projects through NuGet. And I'm finding that as I install our software on systems without installing the above first most of our applications are working perfectly normally without errors. So I'm starting to think a lot of the above are no longer necessary.

Ideally I would just like to chuck 'em all. Relieve the pressure on our support staff to install all these components as well as our software when setting up machines for first use.

It would be great if I could just tell them "look, just install VC++ redistributable version xyz and anything that needs one of the above four builds will work just fine"

I see many resources online claiming that, for example, the 2017 redistributable replaces the 2015 one, and so on but does that backward compatibility go all the way back to the 2005 SP1 version?

My second question is a bit more generic and I don't really expect many answers to that one but.

are there any well known 3rd party developer tools that you know are using one of the four Redistributables mentioned in my list above? For example, we use Crystal Reports runtime 13.0.17 - oh how I wish we could dump that and move on .... And one of our support staff has already identified that that sometimes won't install if the 2005 SP1 runtime is missing. Trying to find out such info from online resources is like looking for a needle in a haystack....


Solution

  • the 2017 redistributable replaces the 2015 one, and so on

    Yes, for certain values of "and so on" ;-) The 2015, 2017 and 2019 redistributables are binary compatible with the most recent release thereof. Quoting Microsoft from C++ binary compatibility between Visual Studio 2015, 2017, and 2019:

    The runtime libraries and apps compiled by any of these versions of the compiler [2015, 2017, 2019] are binary-compatible. It's reflected in the C++ toolset major number, which is 14 for all three versions. [...] Say you have third-party libraries built by Visual Studio 2015. You can still use them in an application built by Visual Studio 2017 or 2019. There's no need to recompile with a matching toolset. The latest version of the Microsoft Visual C++ Redistributable package (the Redistributable) works for all of them.


    does that backward compatibility go all the way back to the 2005 SP1 version?

    No. Quoting again from the same page:

    The Microsoft C++ (MSVC) compiler toolsets in Visual Studio 2013 and earlier don't guarantee binary compatibility across versions. You can't link object files, static libraries, dynamic libraries, and executables built by different versions. The ABIs, object formats, and runtime libraries are incompatible.

    To make things even worse, VS 2005 and 2008 did not have one single set of redistributables, but instead several different versions that were installed in SxS (side by side) mode. From Side-by-side assembly:

    In side-by-side, Windows stores multiple versions of a DLL in the WinSxS subdirectory of the Windows directory, and loads them on demand. This reduces dependency problems for applications that include a side-by-side manifest. [...]
    Microsoft Visual C++ 2005 and 2008 employ SxS with all C runtime libraries.


    are there any well known 3rd party developer tools that you know are using one of the four Redistributables mentioned in my list above?

    This is way too wide for any useful answer. You'll have to (a) identify which tools/components/etc you are using, and (b) which are the dependencies of each, including (though not limited to) the C/C++ runtimes.