Wix - 构建安装包时出错 - ERROR CNDL0200(未处理的扩展元素)

Wix - Error when building setup package - ERROR CNDL0200 (unhandled extension element)

您好,我在构建此 WiX 安装包时遇到问题...我正在使用 Wix utilExtensions 并将其添加到安装项目的引用中。在构建包时,我收到以下错误;

提供XML代码;

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
  <Fragment>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <!--Creates the Roaming folder required for local document    saving-->
      <Directory Id="AppDataFolder">
        <Directory Id="ROAMINGFOLDER" Name="App">
          <Component Id="ROAMINGFOLDER" Guid="*">
            <RemoveFolder Id="ROAMINGFOLDER" On="uninstall"/>
            <RegistryValue Root="HKMU"
                           Key="Software\[Manufacturer]\[ProductName]\Roaming"
                           Type="string"
                           Value="App Roaming Folder" />
          </Component>
        </Directory>
      </Directory>

      <Directory Id="ProgramFilesFolder">
        <Directory Id="APPLICATIONFOLDER" Name="My App">

          <Component Id="APPLICATIONFOLDER" Guid="*">
            <RemoveFolder  Id="APPLICATIONFOLDER"
                       On="both"  />
            <util:RemoveFolderEx Id="APPLICATIONFOLDER" On="uninstall"/>
            <RegistryValue Root="HKMU"
                           Key="Software\[Manufacturer]\[ProductName]"
                           Type="string"
                           Value="My App" />
          </Component>
...

有解决此特定问题的想法吗?

看起来您实际上并没有为构建提供 WixUtilExtension dll。这取决于您的构建方式,但在 Visual Studio 中,您会将 Dll 添加到 References 节点,否则在命令行上,您将在 candle 命令行上使用 -ext WixUtilExtension,并使 Dll 可用在构建位置。