我如何在wix工具集V4 FirewallException中使用?

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

如何使用FirewallException?我添加了xlmns,但仍然出现此错误:

C:\用户 oot\Downloads\glpi\glpi\glpi_.wxs(331) :错误 WIX0200:File 元素包含未处理的扩展元素“FirewallException”。请确保已提供“http://wixtoolset.org/schemas/v4/wxs/firewall”命名空间中元素的扩展。

我听说它是带有dll扩展名的东西,但我没有找到任何相关信息,我使用的是wix v4,使用命令:wix build msi.wxs 代码:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:fire="http://wixtoolset.org/schemas/v4/wxs/firewall">
...
    <Component Id="java2" Guid="811DDBF2-1744-4A9D-96CA-93781A5C435C">
        <File Id="java2" Source="GLPI\java\bin\java.exe" KeyPath="yes">
            <Permission User="Everyone" GenericAll="yes"/>
            <fire:FirewallException id="fwxJavaFirewall" DisplayName="java" Scope="any" protocol="tcp" Port="80" Program="[INSTALLFOLDER]java\bin\java.exe" />
        </File>
    </Component>
...
</Wix>

我尝试使用“wix build msi.wxs -ext WixFirewallException”,没有结果:

C:\Users\root\Downloads\glpi\glpi>wix build  glpi_.wxs -ext WixFirewallException
wix.exe : error WIX0144: The extension 'WixFirewallException' could not be found. Checked paths: WixFirewallException

C:\Users\root\Downloads\glpi\glpi>wix build  glpi_.wxs -ext WixFirewall
wix.exe : error WIX0144: The extension 'WixFirewall' could not be found. Checked paths: WixFirewall

C:\Users\root\Downloads\glpi\glpi>wix build  glpi_.wxs -ext WixFirewallExtension
wix.exe : error WIX0144: The extension 'WixFirewallExtension' could not be found. Checked paths: WixFirewallExtension
.net wix windows-installer wix4
1个回答
0
投票

在 WiX v4 中,扩展是通过 nuget 添加的。您要添加此包:

https://www.nuget.org/packages/WixToolset.Firewall.wixext

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