WiX Bootstrap - 元素包含未处理的扩展属性
WiX Bootstrap - The element contains an unhandled extension attribute
我在使用 WiX 工具集 4.0 开发 WiX Bootstrap 应用程序时遇到问题。
我现在的主要 objective 是检查并防止在 运行 安装程序时重新安装 .NET 4.5 Framework。所以我需要使用 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" 命名空间中的 RegistrySearch 扩展属性,但出现以下错误。
The Fragment element contains an unhandled extension attribute
'RegistrySearch'. Please ensure that the extension for attributes in
the 'http://schemas.microsoft.com/wix/UtilExtension' namespace has
been provided.
我已经添加了对 WixUtilExtension.dll 的引用,并且在尝试从 BalExtension 命名空间添加 PrereqPackage 时也出现此错误。
The ExePackage element contains an unhandled extension attribute
'PrereqPackage'. Please ensure that the extension for attributes in
the 'http://schemas.microsoft.com/wix/BalExtension' namespace has
been provided.
这是我的 Bundle.wxs 文件。
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="Camille"
Version="1.0.0.0"
Manufacturer="Dummy"
UpgradeCode="A48D5F63-0E35-4521-A659-36726E31D080"
Compressed="yes"
DisableModify="button"
>
<!--TODO: Add IconSourceFile argument-->
<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
<Payload SourceFile="..\DummyInstaller.BootstrapperApplication\BootstrapperCore.config"/>
<Payload SourceFile="..\DummyInstaller.BootstrapperApplication\bin\Release\DummyInstaller.BootstrapperApplication.dll"/>
<Payload SourceFile="..\Libs\Dummy.UI.Tools.WPF.MVVMFramework.dll"/>
<Payload SourceFile="..\Libs\Microsoft.Deployment.WindowsInstaller.dll"/>
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id='Netfx45'/>
<MsiPackage SourceFile="..\MSI\DummyInstaller.msi" Id="DummyPackageId" Cache="yes" Visible="no" Vital="yes"/>
</Chain>
</Bundle>
<Fragment>
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" />
<!-- .NET 4.5 only installed if Vista or higher AND it's not already installed-->
<PackageGroup Id="Netfx45">
<ExePackage Id="Netfx45" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes" InstallCommand="/q"
bal:PrereqPackage="yes"
SourceFile="dotnetfx45_full_x86_x64.exe"
DownloadUrl="http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe"
DetectCondition="(Netfx4FullVersion="4.5.50709") AND (NOT VersionNT64 OR (Netfx4x64FullVersion="4.5.50709"))"
InstallCondition="(VersionNT >= v6.0 OR VersionNT64 >= v6.0) AND (NOT (Netfx4FullVersion="4.5.50709" OR Netfx4x64FullVersion="4.5.50709"))"/>
</PackageGroup>
</Fragment>
</Wix>
我认为你的 iis link 有误。请查看此 Migration 页面。
修复:将 http://schemas.microsoft.com/wix/BalExtension
重命名为 http://wixtoolset.org/schemas/v4/wxs/bal
修复:将 http://schemas.microsoft.com/wix/UtilExtension
重命名为 http://wixtoolset.org/schemas/v4/wxs/util
我在使用 WiX 工具集 4.0 开发 WiX Bootstrap 应用程序时遇到问题。
我现在的主要 objective 是检查并防止在 运行 安装程序时重新安装 .NET 4.5 Framework。所以我需要使用 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" 命名空间中的 RegistrySearch 扩展属性,但出现以下错误。
The Fragment element contains an unhandled extension attribute 'RegistrySearch'. Please ensure that the extension for attributes in the 'http://schemas.microsoft.com/wix/UtilExtension' namespace has been provided.
我已经添加了对 WixUtilExtension.dll 的引用,并且在尝试从 BalExtension 命名空间添加 PrereqPackage 时也出现此错误。
The ExePackage element contains an unhandled extension attribute 'PrereqPackage'. Please ensure that the extension for attributes in the 'http://schemas.microsoft.com/wix/BalExtension' namespace has been provided.
这是我的 Bundle.wxs 文件。
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="Camille"
Version="1.0.0.0"
Manufacturer="Dummy"
UpgradeCode="A48D5F63-0E35-4521-A659-36726E31D080"
Compressed="yes"
DisableModify="button"
>
<!--TODO: Add IconSourceFile argument-->
<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
<Payload SourceFile="..\DummyInstaller.BootstrapperApplication\BootstrapperCore.config"/>
<Payload SourceFile="..\DummyInstaller.BootstrapperApplication\bin\Release\DummyInstaller.BootstrapperApplication.dll"/>
<Payload SourceFile="..\Libs\Dummy.UI.Tools.WPF.MVVMFramework.dll"/>
<Payload SourceFile="..\Libs\Microsoft.Deployment.WindowsInstaller.dll"/>
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id='Netfx45'/>
<MsiPackage SourceFile="..\MSI\DummyInstaller.msi" Id="DummyPackageId" Cache="yes" Visible="no" Vital="yes"/>
</Chain>
</Bundle>
<Fragment>
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" />
<!-- .NET 4.5 only installed if Vista or higher AND it's not already installed-->
<PackageGroup Id="Netfx45">
<ExePackage Id="Netfx45" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes" InstallCommand="/q"
bal:PrereqPackage="yes"
SourceFile="dotnetfx45_full_x86_x64.exe"
DownloadUrl="http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe"
DetectCondition="(Netfx4FullVersion="4.5.50709") AND (NOT VersionNT64 OR (Netfx4x64FullVersion="4.5.50709"))"
InstallCondition="(VersionNT >= v6.0 OR VersionNT64 >= v6.0) AND (NOT (Netfx4FullVersion="4.5.50709" OR Netfx4x64FullVersion="4.5.50709"))"/>
</PackageGroup>
</Fragment>
</Wix>
我认为你的 iis link 有误。请查看此 Migration 页面。
修复:将 http://schemas.microsoft.com/wix/BalExtension
重命名为 http://wixtoolset.org/schemas/v4/wxs/bal
修复:将 http://schemas.microsoft.com/wix/UtilExtension
重命名为 http://wixtoolset.org/schemas/v4/wxs/util