2017-12-06 7 views
0

Package要素にPropertyRef要素を追加すると、コンパイル時にエラーが発生します。WixインストーラPropertyRefスキーマ検証エラー

これはこれは、Visual Studioによって生成エラーです

<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> 
    <Product Id="*" Name="MyProduct" Language="1033" Version="!(bind.FileVersion.MyApplication.exe)" Manufacturer="MyManufacturer" UpgradeCode="SOME-GUID"> 
    <PropertyRef Id="WIX_IS_NETFRAMEWORK_461_OR_LATER_INSTALLED" /> 
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> 
    ... 
    </Product> 
    ... 
</Wix> 

私* .wxsファイルです:PropertyRefのdocumentationを見ると

Schema validation failed with the following error at line 1, column 588: The element 'Product' in namespace 'http://schemas.microsoft.com/wix/2006/wi' has invalid child element 'PropertyRef' in namespace 'http://schemas.microsoft.com/wix/2006/wi'. List of possible elements expected: 'Package'. 

ProductPropertyRefの有効な親であることを示しています。

答えて

0

このエラーは、Package要素の後にPropertyRef要素を挿入することで修正できます。

<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> 
    <Product Id="*" Name="MyProduct" Language="1033" Version="!(bind.FileVersion.MyApplication.exe)" Manufacturer="MyManufacturer" UpgradeCode="SOME-GUID"> 
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> 
    <PropertyRef Id="WIX_IS_NETFRAMEWORK_461_OR_LATER_INSTALLED" /> 
    ... 
    </Product> 
    ... 
</Wix> 
関連する問題