使用 Visual Studio 2015 时如何使用 MSI 分发 VC redist?

How to distribute VC redist with an MSI when using Visual Studio 2015?

我们刚刚切换到 Visual Studio 2015,但我们发现应用程序部署存在问题。

我们使用 Wix/MSI 进行部署,直到现在我们一直在使用合并模块来分发 VC redist。

但是现在我们有一个问题,我们的应用程序需要ucrtbase.dll。根据这个 article 有一个新的 Universal CRT,它不包含在任何合并模块中。

在上面提到的文章中,他们是这样说的:

There will not be a merge module for the Universal CRT. If you currently use the CRT merge modules and still want to deploy the Visual C++ libraries centrally, we recommend that you move to the above mentioned Windows Update package or to the VCRedist. Alternatively, you may choose to link statically to the Universal CRT and the Visual C++ libraries

这是否意味着我们不能使用我们的 MSI 分配 C++ 运行时间,因为它不能 运行 可执行文件 (VCRedist.exe)?或者有没有办法在 Visual Studio 2015 编译我们的项目,这样它就不需要这个通用 CRT?

提前致谢。

如果您使用 WiX,您可以切换到 Burn 和 运行 VC Redist 包作为设置的一部分。

您引用的文章还说支持 Dll 的应用程序本地部署,因此您可以安装适当的 Dll 而无需重新分发。

我会使用 Burn 安装官方的 redist - 如果出现问题,这是 Mocrosoft 可以为这些 Dll 提供服务的唯一方法。如果您使用本地应用程序或您自己的 Dll 副本,如果这些 Dll 中存在安全问题,您可能需要发布补丁或升级。