1

我正在尝试制作一个 wix 安装程序。对于 Web 应用程序。

以下是我的 wsx 文件

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
  <Product Id="Guid" Name="TestInstaller" Language="1033" Version="1.0.0.0" Manufacturer="Companyname" UpgradeCode="Guid1">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" />

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes" />
    <PropertyRef Id="WIX_IS_NETFRAMEWORK_462_OR_LATER_INSTALLED"/>
    <Condition Message='This setup requires the .NET Framework 4.7 client profile installed.'>
      <![CDATA[Installed OR WIX_IS_NETFRAMEWORK_462_OR_LATER_INSTALLED]]>
    </Condition>
    <Feature Id="Complete" Title="TestInstaller" Description="TestInstaller" Level="1" ConfigurableDirectory='INSTALLFOLDER'>
      <ComponentGroupRef Id="ProductComponents" />
      <ComponentGroupRef Id="ProductBinComponents" />

    </Feature>


    <UIRef Id="WixUI_Mondo" />
    <UIRef Id="WixUI_ErrorProgressText" />
  </Product>

  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
     <Directory Id="INSTALLFOLDER" Name="Test Installer" >
        <Directory Id="INSTALLBINFOLDER" Name="bin">
        </Directory>
      </Directory>
    </Directory>
  </Fragment>

  <Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
      <Component Id="ProductComponent" Win64="yes" Guid="*">
        <File Source="C:\Temp\Publish\Web.config" />
        <File Source="C:\Temp\Publish\NLog.config"/>
        <File Source="C:\Temp\Publish\Global.asax"/>
      </Component>
    </ComponentGroup>
    <ComponentGroup Id="ProductBinComponents" Directory="INSTALLBINFOLDER">
      <Component Id="ProductBinComponent" Win64="yes" Guid="*">
        <File Source="C:\Temp\Publish\bin\Antlr3.Runtime.dll"/>
        <File Source="C:\Temp\Publish\bin\Antlr3.Runtime.pdb"/>
      </Component>
    </ComponentGroup>
  </Fragment>
</Wix>

但是,每次我尝试构建它时,我都会收到此消息

'.',十六进制值 0x00,是无效字符。

我真的不知道为什么,因为我可以用 notepad++ 编辑的所有文件似乎都有正确的结尾。所以我什至找不到它抱怨的地方,更不用说试图修复它了。谁能指出我正确的方向或知道一个好的解决方法?

我知道 Wix 中存在类似的错误,因为我可以看到有很多人在询问类似的问题,但是我能找到的那些不适用于我的问题,或者我不知道我在哪里可以修复它,因为他们使用的 Wix 版本与我不同。

如果我在我的 wsx 文件中执行以下操作,我可以添加它构建得很好。但是,这删除了我本来想开始使用的用户界面。

 <!--<UIRef Id="WixUI_Mondo" />
<UIRef Id="WixUI_ErrorProgressText" />-->
4

1 回答 1

1

这是仍在积极开发中的 WiX v4 中的一个错误。最新的稳定版本是 v3.11.1,您可以从http://wixtoolset.org/releases/获得。

于 2018-08-09T16:01:50.060 回答