The Fragment element contains an unhandled extension element 'util:RegistrySearch'
Asked Answered
D

1

23

Learning how to create Wix Booloader so that I can install .NET framework with my msi install package. Anyway I am stuck with an error for an unhandled extension element. Code is below

<?xml version="1.0" encoding="utf-8"?>
<!--
# This comment is generated by WixEdit, the specific commandline
# arguments for the WiX Toolset are stored here.

candleArgs: "<projectfile>" -ext WixBalExtension
lightArgs: "<projectname>.wixobj" -ext WixBalExtension
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<Bundle UpgradeCode="80B0ECBE-CAAE-4B6A-9705-49F0232B0C24" 
        Version="0.0.1">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
    <Chain>
        <PackageGroupRef Id="Netfx45" />
    </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-->
    <!-- .NET 4.5 only installed if Vista or higher AND it's not already installed-->    
<PackageGroup Id="Netfx45">
        <ExePackage Id="Netfx45" 
                    Cache="no" 
                    Compressed="yes" 
                    PerMachine="yes" 
                    Permanent="yes" 
                    Vital="yes" 
                    InstallCommand="/q" 
                    SourceFile="C:\Users\ProRip\Downloads\dotnetfx45_full_x86_x64.exe" 
                    DetectCondition="(Netfx4FullVersion=&quot;4.5.50709&quot;) AND (NOT VersionNT64 OR (Netfx4x64FullVersion=&quot;4.5.50709&quot;))" 
                    InstallCondition="(VersionNT &gt;= v6.0 OR VersionNT64 &gt;= v6.0) AND (NOT (Netfx4FullVersion=&quot;4.5.50709&quot; OR Netfx4x64FullVersion=&quot;4.5.50709&quot;))" />
    </PackageGroup>
</Fragment>

Error message is

error CNDL0200 : The Fragment element contains an unhandled extension element 'util:RegistrySearch'.  Please ensure that the extension for elements in the 'http://schemas.microsoft.com/wix/UtilExtension' namespace has been provided.
error CNDL0200 : The Fragment element contains an unhandled extension element 'util:RegistrySearch'.  Please ensure that the extension for elements in the 'http://schemas.microsoft.com/wix/UtilExtension' namespace has been provided

Can anyone please explain what my error is I have included the correct namespace and I can't see a reason for the error!

Delgadillo answered 13/3, 2014 at 13:10 Comment(4)
When you compile your code with candle, do you -ext WixUtilExtension?Albuminoid
ok I have changed the -ext WixBalExtension to WixUtilExtension but now I have error with default bootstrapper application Unresolved reference to symbol 'WixBootstrapperApplication:WixStandardBootstrapperApplication.RtfLicense'Delgadillo
You should not replace, but add another extension. Like this: -ext WixUtilExtension,WixBalExtension. I might be mistaken with syntax, though - just play with it until it worksAlbuminoid
thanks heaps its done now, I was trying a few combinations to get multiple extensions to work. It turns out that it needs to be "-ext WixBalExtension -ext WixUtilExtension" I gave up before as I was unsure that I was able to use multiple extensions.Delgadillo
W
57

The WiX extension for the namespace xmlns:util="http://schemas.microsoft.com/wix/UtilExtension is provided by a dll named WixUtilExtension (this assuming you are using Visual Studio). Right-click on the References node in your project and add a reference to the WixUtilExtension dll.

Wille answered 12/5, 2014 at 14:47 Comment(3)
Thanks. I'll add you may be able to get these dll's from nuget as well. <?xml version="1.0" encoding="utf-8"?> <packages> <package id="WiX.Toolset" version="3.9.1208" targetFramework="net45" /> </packages> This helps on my build machine where I haven't installed Wix (as I did locally)Doughman
also if you are running on the commandline, you need to add -ext WiXNetFxExtension to your light call and maybe the candle call, too. wixtoolset.org/documentation/manual/v3/howtos/general/…Inclinometer
I meant -ext WixUtilExtension.Inclinometer

© 2022 - 2024 — McMap. All rights reserved.