【问题标题】:While adding ComponentGroup in Wix 3.6.2221.0 i get the error [closed]在 Wix 3.6.2221.0 中添加 ComponentGroup 时出现错误 [关闭]
【发布时间】:2012-07-02 06:48:02
【问题描述】:

错误 19 Directory 元素包含意外的子元素“ComponentGroup”。报告\目录.wxs 216 1

【问题讨论】:

    标签: wix wix3.6


    【解决方案1】:

    根据wix documentation for ComponentGroup,可能的父元素是FragmentProduct。不允许将组件组直接放在目录元素下。

    我通常将每个组件组放在一个单独的 wxs 文件中,如下所示:

    <?xml version='1.0' encoding='utf-8'?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
        <Fragment>
    
            <DirectoryRef Id="someFolder">
                <Component Id="file1">
                    <File Source="file1" />
                </Component>
                <Component Id="file2">
                    <File Source="file2" />
                </Component>
            </DirectoryRef>
    
            <ComponentGroup Id="mycomponentgroup">
                <ComponentRef Id="file1" />
                <ComponentRef Id="file2" />
            </ComponentGroup>
    
        </Fragment>
    </Wix>
    

    然后我在相关的Feature 下放了一个ComponentGroupRef

    【讨论】:

      【解决方案2】:

      ComponentGroup 需要放入&lt; Product&gt; 标签,而不是&lt; Directory&gt; 标签。更加注意标签的位置。

      【讨论】:

      • 太棒了,伙计们。谢谢大家..我的帖子回答了当前的问题。起初回答。如果您无法正确阅读或无法理解quickly,那不是我的问题。想要很好的答案?去设计者那里。它只是一个proger门户。有很多空闲时间可以花在这些答案上吗?好的,我为你高兴。同时我会赚你的钱。最良好的祝愿 =)
      猜你喜欢
      • 2018-09-20
      • 1970-01-01
      • 2011-01-09
      • 1970-01-01
      • 2015-04-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-01
      相关资源
      最近更新 更多