设置 Wix v4 安装程序用于控制台应用程序

huangapple go评论57阅读模式
英文:

Setup Wix v4 Installer for Console Application

问题

I want to create a Installer for a Asp.Net Core WebAPI as a Windows Service.

但在安装过程中,我总是收到来自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/获取了组件。

我是否漏掉了什么?

我检查了以下条目:
https://stackoverflow.com/questions/23807309/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/中,也没有列出支持的扩展。

英文:

I want to create a Installer for a Asp.Net Core WebAPI as a Windows Service.

But during setup I always get errors from wix.

I started setting up a Console Application:

<?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>

But I always get the error:

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.

I got the components from https://wixtoolset.org/docs/tools/burn/wixstdba/.

Is there anything I missed?

I checked the following entry:
https://stackoverflow.com/questions/23807309/error-cndl0200-wixbalextension-schema

but it is using a older version of wix.

wix build -ext WixBalExtension .\Bundle.wxs

returned:

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

Maybe the name of the extension has changed in v4, but I couldn't found a list of extensions available.

https://wixtoolset.org/docs/v3/wixdev/extensions/extensions/ is for v3 and is no longer maintained.
In the new https://wixtoolset.org/docs/intro/ there is no list of supported extensions either.

答案1

得分: 1

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

英文:

Add the WixToolset.Bal.wixext NuGet package to your .wixproj.

huangapple
  • 本文由 发表于 2023年5月17日 19:12:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76271456.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定