在Visual Studio中为多个应用程序创建安装项目 [英] Creating a Setup Project for multiple applications in Visual Studio

查看:70
本文介绍了在Visual Studio中为多个应用程序创建安装项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有两个应用程序-App A和App B,它们已经创建并且可以正常工作.现在,我想创建一个新的安装项目,该项目可用于为两个应用程序创建安装文件.可以创建用于安装两个应用程序的安装文件吗?我还想以一种方式执行安装-一旦安装了App A,则仅应开始安装App B.

Suppose I have two application - App A and App B which are already created and are working fine. Now I want to create a new setup project which can be used to create a setup file for both of the applications. Can this be possible of creating a setup file for installing both apps? Also I want to perform the installation in such a way that - once the App A is installed then only the installation of App B should begin.

谢谢.

推荐答案

使用VS安装程序项目,您可以创建一个包含两个应用程序中所有内容"的安装程序(我假设您的意思是MSI安装程序,而不是ClickOnce).然后,您将拥有一个安装程序,该安装程序将进行安装并为您提供程序和功能"中的一个条目.通常不需要"A必须先安装好,然后B才能安装",因为与所有MSI安装一样,单个组合设置是事务性的-如果任何失败,则整个安装将回滚.

With VS setup projects you can create one setup (I assume you mean an MSI setup and not ClickOnce) that contains "everything" from both apps - the files, the shortcuts, dependencies etc. Then you will have a single setup that will install and give you one entry in Programs&Features. There's often no need to have a "A must install ok before B installs" because that single combined setup is transactional, like all MSI installs - if anything fails then the entire install rolls back.

如果A仅包含恰好打包为B和其他产品要使用的MSI的功能,则有时人们只是将A构建为合并模块并将其包含到B(和其他设置)中,但这取决于关于为什么要设置两个设置以及业务/工作流程的要求.

If A just contains functionality that happens to be packaged as an MSI that B and other products are going to use, then sometimes people just build A as a merge module and include it into B (and the other setups) but that depends on why there are two setups and the business/workflow requirements.

没有VS支持将单独的MSI文件合并为一个设置,并以A成功为条件B.您也可以编写运行两个MSI的启动器,但是您会在其中看到两组UI和两个条目程序和功能,但您不必说这些是否要避免.显然,如果B依赖于A并且在Programns& Features中有两个条目,则用户可能会卸载A并破坏B.

There's no VS support for combinining separate MSI files into one setup and conditioning B on the success of A. You may as well just write a launcher that runs both MSIs, but you'll see two sets of UI and two entries in Programs&Features, but you don't say if these are things you want to avoid or not. Obviously if B depends on A and there are two entries in Programns&Features it's possible a user could uninstall A and break B.

主要问题是您是否只是想要一个启动程序,该启动程序将安装一定数量的MSI文件,每个文件都具有其自己的UI和在程序和功能"中的条目,还是想要使多个MSI文件作为单个安装和卸载的集成体验?产品.

The main issue is whether you just want a launcher that will install some number of MSI files each with their own UI and entry in Programs&Features, or you want an integrated experience that makes multiple MSI files install and uninstall as a single product.

除此之外,我知道人们使用诸如VS之类的东西来构建其MSI文件,然后使用WiX Burn引导程序将它们组合为一个产品,其中程序和功能"条目将所有MSI文件组合在一起.

Apart from that, I've known people build their MSI files with something like VS and then use the WiX Burn bootstrapper to combine them into one product, where the Programs&Features entry combines all the MSI files.

曾经有Bootstrap Manifest Generator工具,该工具可让您添加A作为必备组件,因此setup.exe会先安装必备组件(包括A),然后再安装B,但是由于安装程序项目,很难找到该工具及其文档.在VS 2012中被抢走.

There used to be the Bootstrap Manifest Generator tool that would let you add A as a prerequisite so setup.exe would install prerequisites, including A, and then install B, but that tool and its docs are hard to find since setup projects got taken away in VS 2012.

这篇关于在Visual Studio中为多个应用程序创建安装项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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