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

查看:108
本文介绍了用于在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 Files\Merge Modules\Microsoft_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 Files\Merge Modules\Microsoft_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.

通过搜索,我怀疑来自vc_redist.x86.exe中可能还有其他文件" >这里,但是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.

推荐答案

在Visual Studio 2015中,VC ++运行时可再发行组件变得更加复杂.请参见

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.另外,您可以选择静态链接到Universal 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天全站免登陆