简体   繁体   English

使用WIX来安装同一IIS站点的并行版本

[英]Use WIX to install side by side versions of the same IIS site

Is it possible to use WIX to install side by side versions of the same IIS website. 是否可以使用WIX来安装同一IIS网站的并行版本。 Including the ability to upgrade them individually? 包括单独升级它们的能力? I've searched high and low and can't find anything on the internet for this. 我搜索过很多东西,在互联网上找不到任何东西。

Also why is using heat to harvest files automatically with each build such a no no? 另外,为什么每次构建时都使用热量自动收集文件,所以不行吗? Having to manually update the file structure in WIX when it's already handled in VS and source control is such a pain if you're adding views, models, controllers a lot during development. 如果在开发过程中要添加很多视图,模型和控制器,那么在VS和源代码管理中已经处理过的WIX文件结构必须手动更新,这是一件很痛苦的事情。

I'd like to be able to publish the site during a TFS build and then harvest the output for the installer. 我希望能够在TFS构建期间发布站点,然后为安装程序收集输出。

Is there a better way than WIX to do this? 有比WIX更好的方法吗? A deployment tool like Octopus or Web Deploy isn't an option though as it needs to be an installer. 像Octopus或Web Deploy这样的部署工具不是一个选项,因为它需要是安装程序。 A paid for option is also out. 付费期权也已支付。

Windows Installer supports installing multiple instances via instance transforms . Windows Installer支持通过实例转换安装多个实例。 Essentially, you can install the package with new product code upgrade codes, and the different products can be managed individually. 本质上,您可以使用新的产品代码升级代码安装软件包,并且可以单独管理不同的产品。

You add an InstanceTransforms element to your package, and add a child Instance element for each custom instance you want to support in addition to the default instance: 您将InstanceTransforms元素添加到您的包中,并为默认实例之外的每个您要支持的自定义实例添加一个子Instance元素:

<InstanceTransforms Property="INSTANCEID">
    <Instance Id="P1" ProductCode="GUID1" UpgradeCode="GUID2" ProductName="My App P1" />
    <Instance Id="P2" ProductCode="GUID3" UpgradeCode="GUID4" ProductName="My App P2" />
</InstanceTransforms>

This allows you to install up to three copies: the default instance, plus instances P1 and P2. 这使您最多可以安装三个副本:默认实例,以及实例P1和P2。 To install each, use one of these commands: 要安装每个,请使用以下命令之一:

msiexec /i MyApp.msi
msiexec /i MyApp.msi MSINEWINSTANCE=1 TRANSFORMS=":P1"
msiexec /i MyApp.msi MSINEWINSTANCE=1 TRANSFORMS=":P2"

Then on your non-file components, add the Component/@MultiInstance="yes" attribute. 然后在您的非文件组件上,添加Component/@MultiInstance="yes"属性。 This will create a new component guid for each transform, so you can install multiple copies of the component (one for each transform). 这将为每个转换创建一个新的组件guid,因此您可以安装该组件的多个副本(每个转换一个)。

This blog post " Revisited: Multiple Instance installations and patches " describes using the InstanceTransforms element and the Component/@MultiInstance attribute in more detail. 这篇博客文章“ 重访:多个实例的安装和补丁 ”详细介绍了如何使用InstanceTransforms元素和Component/@MultiInstance属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM