The Fragment element contains an unhandled extension element 'util:RegistrySearch'

喜你入骨 提交于 2019-12-21 07:26:07

问题


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!


回答1:


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.



来源:https://stackoverflow.com/questions/22379707/the-fragment-element-contains-an-unhandled-extension-element-utilregistrysearc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!