问题
I am having trouble developing a WiX Bootstrap Application using WiX Toolset 4.0.
My main objective right now is to check and prevent from reinstalling .NET 4.5 Framework when running the installer. So I need to use the RegistrySearch extension attribute from the xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" namespace but I am getting the following error.
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.
I already added the reference to WixUtilExtension.dll and I also get this error when trying to add PrereqPackage from the BalExtension namespace.
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.
Here is my Bundle.wxs file.
<?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>
回答1:
I think you have the wrong iis link. Please check this Migration page.
Fix: Rename http://schemas.microsoft.com/wix/BalExtension
to http://wixtoolset.org/schemas/v4/wxs/bal
Fix: Rename http://schemas.microsoft.com/wix/UtilExtension
to http://wixtoolset.org/schemas/v4/wxs/util
来源:https://stackoverflow.com/questions/34644530/wix-bootstrap-the-element-contains-an-unhandled-extension-attribute