我们刚刚切换到 Visual Studio 2015,但我们发现应用程序部署存在问题。
我们使用 Wix/MSI 进行部署,到目前为止,我们使用合并模块来分发 VC redist。
但是现在我们遇到一个问题,我们的应用程序需要ucrtbase.dll。根据此 article 有一个新的通用 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,而无需 redist。
我会使用 Burn 来安装官方 redist - 这是 Mocrosoft 在出现问题时可以为这些 Dll 提供服务的唯一方法。如果您使用应用程序本地或您自己的 Dll 拷贝,如果这些 Dll 中存在安全问题,您可能需要发布补丁或升级。
关于c++ - 使用 Visual Studio 2015 时如何通过 MSI 分发 VC redist?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34207400/