在 msi 中 WIX 同一文件的多个副本,但只会安装一个 [英] WIX multiple copies of same file in msi but only one will be installed

查看:19
本文介绍了在 msi 中 WIX 同一文件的多个副本,但只会安装一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有多个环境,构建、测试、生产等

i have multiple environments, build, test, prod etc.

我想在 wix 中创建一个安装程序,它可以保存多个 machine.config 文件.然后根据命令行传入的特征值只安装一个文件.

i'd like to create a single installer in wix, which can hold multiple machine.config files. then based on the feature value passed in through the command line only one file will be installed.

概念上听起来很简单,但我收到一个 ICE30 错误,说明

conceptualy it sounds easy but i receive an ICE30 error stating that

"ICE30: 目标文件 'btfrgsa_|[FILENAME]' 由 LFN 系统上的两个不同组件安装在 '[TARGETDIR]\NETFRAMEWORK40FULLINSTALLROOTDIR64\CONFIG\':'MachineConfigs.WS' 和 'MachineConfigs.APP'.这打破了组件引用计数.".

"ICE30: The target file 'btfrgsa_|[FILENAME]' is installed in '[TARGETDIR]\NETFRAMEWORK40FULLINSTALLROOTDIR64\CONFIG\' by two different components on an LFN system: 'MachineConfigs.WS' and 'MachineConfigs.APP'. This breaks component reference counting.".

最好的方法是什么?

谢谢

Semaj

推荐答案

几种方法:

  1. 使用不同名称的文件( 1.config 、 2.config )创建多个功能和组件,然后使用 CopyFile 元素将 x.config 复制到实际文件名.) 这将导致 x.config 和 real.config 被部署,但它是无害的,卸载将正常进行.

  1. Create several features and components with files of different names ( 1.config, 2.config ) and then use the CopyFile element to cause x.config to be copied to the real file name. ) This will result in x.config and real.config being deployed but it's harmless and the uninstall will work cleanly.

确定 x.configs 之间的差异,并使用 XML 更改在安装时使用 xpath 语句应用它们.

Identify the differences between the x.configs and use XML changes to apply them at install time using xpath statements.

这篇关于在 msi 中 WIX 同一文件的多个副本,但只会安装一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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