25

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!

4
  • 4
    When you compile your code with candle, do you -ext WixUtilExtension? Commented Mar 13, 2014 at 13:59
  • 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' Commented Mar 14, 2014 at 14:08
  • 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 works Commented Mar 14, 2014 at 14:11
  • 1
    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. Commented Mar 14, 2014 at 14:17

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

3 Comments

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)
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/…
I meant -ext WixUtilExtension.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.