2017-12-06 2 views
0

요소에 PropertyRef 요소를 추가하면 컴파일하는 동안 오류가 발생합니다. Wix Installer PropertyRef 스키마 유효성 검사 오류

내 *의 .wxs이 비주얼 스튜디오에 의해 생성 된 오류입니다

<?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> 

파일입니다

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'. 

PropertyRef의 documentation 보면이 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>