为 Wix Toolset 4.0.1 创建 .wxs 文件时出错

问题描述 投票:0回答:1

我对此完全陌生,我正在尝试创建一个 .wxs 文件来为我创建的 .dll 创建 .msi 安装程序。

我检查了 Wix 文档并请求了 chatgpt 的帮助,但没有成功解决问题。

在我的 .wxs xml 下方:

<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
    <Product Id="*" Name="RTD Installer" Version="0.0.1" Manufacturer="ksr" Language="1033" UpgradeCode="{00F8DEE0-EEEE-FFFF-AAAA-623A8A8007D3">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/>
        <MajorUpgrade DowngradeErrorMessage="Uma versão mais recente já está instalada."/>
        <MediaTemplate EmbedCab="yes"/>

        <Feature Id="ProductFeature" Title="Main Feature" Level="1">
            <ComponentGroupRef Id="ProductComponents"/>
        </Feature>

        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFilesFolder">
                <Directory Id="INSTALLFOLDER" Name="RTD">
                    <ComponentGroup Id="ProductComponents">
                        <Component Id="ProductComponent">
                            <File Source="bin/Release/RTDService.dll"/>
                            <Class Id="{4b000004-0000-0000-0000-90000615130d}" Context="InprocServer32" Description="RTD Server" ThreadingModel="apartment">
                                <ProgId Id="RTD" Description="RTD Server" />
                            </Class>
                        </Component>
                    </ComponentGroup>
                </Directory>
            </Directory>
        </Directory>

        <!-- Propriedades e atualizações movidas para dentro do Product -->
        <Property Id="ARPCOMMENTS" Value="RTD Server"/>
        <Property Id="ARPHELPLINK" Value="http://rtd.ksr.com.br/help"/>
        <Property Id="ARPURLINFOABOUT" Value="http://rtd.ksr.com.br"/>
        <Property Id="ARPURLUPDATEINFO" Value="http://rtd.ksr.com.br/update"/>
        <Property Id="ARPREADME" Value="Leia-me"/>
        <Property Id="ARPCONTACT" Value="[email protected]"/>
    </Product>
</Wix>

执行

wix build ExQuoteService.wxs
时出现以下错误:

error WIX0005: The Wix element contains an unexpected child element 'Product'.

  • 如何修复 Wix 4.0.1+6e6eb478 的 .wxs xml 文件?
  • 获取 .msi 安装程序文件的命令是什么?
c# wix windows-installer
1个回答
0
投票

根据 WiX v4 文档,WiX v4 中不再有

Product
元素。您拥有的是带有 v4 命名空间的 v3 .wxs 代码。也许您还在阅读 v3 文档?

将命名空间放回 v3 命名空间并使用 转换工具为您升级可能会更容易。

您可能还会发现 部署 Dojo 展示 很有用。我在那里讨论了这些主题。

© www.soinside.com 2019 - 2024. All rights reserved.