1

エラー 19 ディレクトリ要素に予期しない子要素 'ComponentGroup' が含まれています。レポート\ディレクトリ.wxs 216 1

4

2 に答える 2

4

ComponentGroup の Wix ドキュメントによると、可能な親要素はFragmentまたはProductです。ディレクトリ要素の直下にコンポーネント グループを配置することはできません。

私は通常、次のように各コンポーネント グループを個別の 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>

そしてComponentGroupRef、関連する の下に a を置きますFeature

于 2012-07-02T08:48:40.460 に答える
-1

ComponentGroupタグに配置する必要がありますが、< Product>タグには配置しません< Directory>。タグの配置にもっと注意を払ってください。

于 2012-07-02T06:53:05.520 に答える