用于在 Windows 7 上部署使用 Visual Studio 2015 开发的 C++ exe 的可再发行组件 [英] Redistributables for deploying C++ exe developed with Visual Studio 2015 on Windows 7

查看:25
本文介绍了用于在 Windows 7 上部署使用 Visual Studio 2015 开发的 C++ exe 的可再发行组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Visual Studio 2015(在 Windows 10 上)开发了一个 32 位 C++ 应用程序.我想将它部署到运行 Windows 7 及更高版本的机器上.

I have developed a 32-bit C++ application using Visual Studio 2015 (on Windows 10). I want to deploy it onto machines running Windows 7 and later.

我组装了一个 WiX 安装程序并包含 VC++ 可再发行合并模块,如 此处所述.我包含的合并模块是 C:Program Files (x86)Common FilesMerge ModulesMicrosoft_VC140_CRT_x86.msm.

I put together a WiX installer and included the VC++ redistributable merge module as described here. The merge module I included was C:Program Files (x86)Common FilesMerge ModulesMicrosoft_VC140_CRT_x86.msm.

此安装程序似乎工作正常,但在 Windows 7 上安装的程序将无法运行,并抱怨缺少 api-ms-win-crt-runtime-l1-1-0.dll.

This installer appears to work fine but on Windows 7 the installed program will not run, complaining about missing api-ms-win-crt-runtime-l1-1-0.dll.

通过搜索,我怀疑 这里,但 WiX 文档告诉我使用 msm 而不是 exe.

From searching I suspect that there may be extra files in the redistributable package vc_redist.x86.exe from here, but the WiX docs tell me to use an msm rather than an exe.

合并模块也有可能安装失败.我没有看到任何错误,但我没有在启用日志的情况下重新运行它以检查这种可能性.

It's also possible that the merge module failed to install. I didn't see any errors but I haven't re-run it with logs enabled to check that possibility.

另一种选择可能是使用 burn 但我不熟悉这个工具;如果它是正确的,我会走那条路,但如果可能的话,我更愿意坚持使用 MSI.

Another option may be to use burn but I am not familiar with this tool; I will go that route if it's the correct one but I'd prefer to stick with MSI if possible.

推荐答案

VC++ 运行时可再发行组件在 Visual Studio 2015 中变得更加复杂.请参阅 VC 团队博客文章 关于通用 CRT.基本上是merge模块不足:

The VC++ runtime redistributables got more complicated in Visual Studio 2015. See the VC team blog post about the universal CRT. Basically, the merge module is insufficient:

通用 CRT 不会有合并模块.如果您当前使用 CRT 合并模块并且仍想集中部署 Visual C++ 库,我们建议您移至上述 Windows Update 包或 VCRedist.或者,您可以选择静态链接到通用 CRT 和 Visual C++ 库.

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.

这篇关于用于在 Windows 7 上部署使用 Visual Studio 2015 开发的 C++ exe 的可再发行组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆