asp.net 为控制台应用程序设置Wix v4安装程序

46qrfjad  于 2023-05-19  发布在  .NET
关注(0)|答案(1)|浏览(154)

我想为作为Windows服务的Asp.Net Core WebAPI创建安装程序。
但是在安装过程中,我总是从wix得到错误。
我开始设置一个控制台应用程序:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
     xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
    <Bundle Name="Bootstrapper1" Version="1.0.0.0" Manufacturer="FSeidl" UpgradeCode="5366e410-23a7-4027-857a-e3de98c8081c">

        <BootstrapperApplication>
            <bal:WixStandardBootstrapperApplication
                    LicenseUrl=""
                    Theme="hyperlinkLicense" />
        </BootstrapperApplication>
        
        <Chain>
            <!-- TODO: Define the list of chained packages. -->
            <!-- <MsiPackage SourceFile="path\to\your.msi" /> -->
            <PackageGroupRef Id="BundlePackages"/>
            <ExePackage
                    DetectCondition="DetectedSomethingVariable"
                    UninstallArguments="-uninstall"
                    SourceFile="../ConsoleTest/bin/Debug/net7.0/ConsoleTest.exe" />
        </Chain>
    </Bundle>

    <Fragment>
        <PackageGroup Id="BundlePackages">
            <PackageGroupRef Id="PrereqPackages"/>
        </PackageGroup>
    </Fragment>
    <Fragment>
        <PackageGroup Id="PrereqPackages">
        </PackageGroup>
    </Fragment>
</Wix>

但我总是犯错误:

D:\Tests\WixTest\Bootstrapper1\Bundle.wxs(7) : error WIX0200: The BootstrapperApplication element contains an un
handled extension element 'WixStandardBootstrapperApplication'. Please ensure that the extension for elements in
 the 'http://wixtoolset.org/schemas/v4/wxs/bal' namespace has been provided.

我从https://wixtoolset.org/docs/tools/burn/wixstdba/得到了组件。
有什么我错过的吗?
我检查了以下条目:Error CNDL0200: WixBalExtension Schema
但它使用的是旧版本的Wix。
wix build -ext WixBalExtension .\Bundle.wxs
返回:

wix.exe : error WIX0144: The extension 'WixBalExtension' could not be found. Checked paths: WixBalExtension

也许扩展的名称在v4中已经更改,但我找不到可用的扩展列表。
https://wixtoolset.org/docs/v3/wixdev/extensions/extensions/用于v3,不再维护。在新的https://wixtoolset.org/docs/intro/中,也没有支持的扩展列表。

7vhp5slm

7vhp5slm1#

WixToolset.Bal.wixext NuGet包添加到您的.wixproj。

相关问题