问题描述
我正在为我的Windows应用程序之一创建一个安装程序项目.
I am creating an installer project for one of my windows applications .
我想确保首先安装了msi,即在安装主要输出之前.这里有问题的MSI是Microsoft VisualFoxPro OLEDB
.
I want to make sure that an msi is installed first i.e. before the primary output is installed . The msi in question here is Microsoft VisualFoxPro OLEDB
.
因此,如果我尝试将自定义操作添加为
So if I tried adding custom action as
因此,如果我将文件类型更改为所有文件并尝试添加msi,则会显示错误消息
So if I change the file type to all files and try adding the msi , it gives an error saying
还有其他方法可以实现我在这里想要实现的目标吗?
Is there any other way to do what I am trying to achieve here?
推荐答案
所有Visual Studio定制操作都在安装了所有文件之后运行,因此在安装主输出之前,您不能使用定制操作来安装另一个MSI.另外,由于不允许同时进行基于MSI的安装,因此通过自定义操作运行基于MSI的安装可能会失败.
All Visual Studio custom actions run after all the files have been installed, so you cannot use a custom action to install another MSI before your primary output is installed. Also, running an MSI-based install from a custom action is likely to fail because concurrent MSI-based installs are not allowed.
执行此操作的通常方法是创建一个引导程序包,该程序包会在安装MSI之前先安装依赖项,然后从这里开始:
The normal way to do this is to create a bootstrapper package that installs dependencies before your MSI is installed, start here:
https://msdn.microsoft.com/en-us/library/ms165429.aspx
这篇关于在安装程序项目中的安装之前添加安装MSI的自定义操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!