visual-c++ - Microsoft Visual C++ 运行时版本?我需要全部保留吗?

标签 visual-c++ runtime redistributable

我一直在四处寻找,我不确定我是否看到了一个明确的答案,所以如果之前有人问过这个问题,我很抱歉;我的“Google-Fu”让我失望了。

我们正在针对 .NET Framework 开发软件,但过去我们不得不包含许多第 3 方组件。此外,从历史上看,这些往往伴随着对 Microsoft Visual Studio C++ 运行时版本的各种依赖。这导致我们将分发作为初始安装过程的一部分:

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

但随着时间的推移,我们使用的许多第 3 方组件已被更新更好的组件所取代,我们通过 NuGet 将它们包含到我们的项目中。而且我发现当我在系统上安装我们的软件而不安装上面的第一个时,我们的大多数应用程序都可以正常工作而没有错误。所以我开始认为上面的很多内容都不再需要了。

理想情况下,我只想把它们全部扔掉。减轻我们的支持人员在设置机器以供首次使用时安装所有这些组件以及我们的软件的压力。

如果我能告诉他们“看,只需安装 VC++ 可再发行版本 xyz,任何需要上述四个构建之一的东西都可以正常工作”,那就太好了

我在网上看到很多资源声称,例如,2017 年可再发行版取代了 2015 年版,等等,但是这种向后兼容性是否一直追溯到 2005 SP1 版本?/p>

我的第二个问题有点笼统,但我真的不希望有很多答案。

是否有任何众所周知的第 3 方开发人员工具正在使用我上面列表中提到的四种可再发行组件之一?例如,我们使用 Crystal Reports 运行时 13.0.17 - 哦,我多么希望我们可以放弃它并继续......我们的一名支持人员已经确定有时不会安装如果缺少 2005 SP1 运行时。试图从在线资源中查找此类信息就像大海捞针一样....

最佳答案

the 2017 redistributable replaces the 2015 one, and so on

是的,对于“等等”的某些值;-) 2015、2017 和 2019 可再发行组件与其最新版本二进制兼容。引用 Microsoft 来自 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?

没有。从同一页面再次引用:

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.

更糟糕的是,VS 2005 和 2008 没有一个单一的可再发行组件集,而是多个以 SxS(并排)模式安装的不同版本。来自 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?

对于任何有用的答案来说,这太宽泛了。您必须 (a) 确定您正在使用哪些工具/组件/等,以及 (b) 哪些是每个工具/组件/等的依赖项,包括(但不限于)C/C++ 运行时。

关于visual-c++ - Microsoft Visual C++ 运行时版本?我需要全部保留吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61780486/

相关文章:

visual-studio-2008 - 如何修复 SAPI 5.1 头文件中的编译器错误

c++ - 有没有办法在 Visual Studio 2012 中使用委托(delegate)构造函数?

c++ - Vector中如何使用复制功能?

iphone - Objective-C : How to improve repetitive method implementations using method forwarding

visual-c++ - 如何检测 VC++ 2008 可再发行组件?

c++ - 如何避免转换函数中的复制构造函数?

iphone - 获取iPhone应用程序的当前环境

performance - 为什么批处理模式比 parfor 快这么多?

visual-studio - 如何使用 Visual Studio 设置安装可再发行组件?

python - Microsoft Visual C++ 2008 Redistributable Package 可以自由再分发吗