2

我在使用 WiX Toolset 4.0 开发 WiX Bootstrap 应用程序时遇到问题。

我现在的主要目标是在运行安装程序时检查并防止重新安装 .NET 4.5 Framework。因此,我需要使用 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" 命名空间中的 RegistrySearch 扩展属性,但出现以下错误。

Fragment 元素包含未处理的扩展属性“RegistrySearch”。请确保已提供“ http://schemas.microsoft.com/wix/UtilExtension ”命名空间中的属性扩展。

我已经添加了对 WixUtilExtension.dll 的引用,并且在尝试从 BalExtension 命名空间添加 PrereqPackage 时也出现此错误。

ExePackage 元素包含未处理的扩展属性“PrereqPackage”。请确保已提供“ http://schemas.microsoft.com/wix/BalExtension ”命名空间中的属性扩展。

这是我的 Bundle.wxs 文件。

<?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=&quot;4.5.50709&quot;) AND (NOT VersionNT64 OR (Netfx4x64FullVersion=&quot;4.5.50709&quot;))"
                  InstallCondition="(VersionNT >= v6.0 OR VersionNT64 >= v6.0) AND (NOT (Netfx4FullVersion=&quot;4.5.50709&quot; OR Netfx4x64FullVersion=&quot;4.5.50709&quot;))"/>
    </PackageGroup>  
  </Fragment>
</Wix>

4

1 回答 1

1

我认为你有错误的 iis 链接。请检查此迁移页面。

修复:重命名http://schemas.microsoft.com/wix/BalExtensionhttp://wixtoolset.org/schemas/v4/wxs/bal

修复:重命名http://schemas.microsoft.com/wix/UtilExtensionhttp://wixtoolset.org/schemas/v4/wxs/util

于 2017-09-01T06:41:29.433 回答