错误 0x8007000b:无法创建托管引导程序应用程序

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

我希望你一切都好:)

所以,我正在做一些关于 Burn、Bootstrapper 工具的 wix 教程。

我尝试构建自己的 UI(按照本教程),当我想运行它时,它崩溃了。

我已将其添加到我的 AsseblyInfo.cs 中

[assembly: BootstrapperApplication(
    typeof(CustomBootstrapperApplication))]

这是我的 BootstrapperCore.config

<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->


<configuration>
    <configSections>
        <sectionGroup name="wix.bootstrapper" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore">
            <section name="host" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" />
        </sectionGroup>
    </configSections>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" />
        <supportedRuntime version="v2.0.50727" />
    </startup>
    <wix.bootstrapper>
        <!-- Example only. Use only if the startup/supportedRuntime above cannot discern supported frameworks. -->
        <!--
        <supportedFramework version="v4\Client" />
        <supportedFramework version="v3.5" />
        <supportedFramework version="v3.0" />
        -->

        <!-- Example only. Replace the host/@assemblyName attribute with assembly that implements BootstrapperApplication. -->
        <host assemblyName="CustomBA" />
    </wix.bootstrapper>
</configuration>

我的库类称为 CustomBA。

一切都编译得很好,但是当尝试运行 *.exe 输出文件时,它不起作用。

查看日志后我发现了这个......

[5364:3710][2020-07-22T13:53:50]i000: Loading managed bootstrapper application.
[5364:3710][2020-07-22T13:53:50]e000: Error 0x8007000b: Failed to create the managed bootstrapper application.
[5364:3710][2020-07-22T13:53:50]e000: Error 0x8007000b: Failed to create UX.
[5364:3710][2020-07-22T13:53:50]e000: Error 0x8007000b: Failed to load UX.
[5364:3710][2020-07-22T13:53:50]e000: Error 0x8007000b: Failed while running 

我已经挣扎了好几天了。我可以看到这个问题是很多年前出现的,但是没有人为新版本的 netframework 4.8 和 wix 3.11 提供解决方案(我认为这是问题所在,因为我遵循的教程使用 NetF 3.5 和 Wix 3.6 我认为 https://learning.oreilly.com/library/view/wix-36-a/9781782160427/ch16s07.html)。这就是我提出新帖子的原因。

我希望有人能帮助我解决这个问题。亲切的问候:)

c# user-interface wix bootstrapper
2个回答
7
投票

所以,就像我说的,我也看到了,我的意思是太多的帖子寻求帮助而没有解决方案。然而,一整天后,我发现 UI MVVM 库类和引导程序应用程序必须使用 Release x86 进行编译。我使用 x64 进行编译,因为我的 msi 是用这样的架构构建的。

我希望对其他人有帮助。


0
投票

也挣扎了好几天,我在 x86 版本上构建了我的版本,但仍然看到无法创建托管引导程序应用程序。您介意发布您的 CustomBA.cs 代码吗?

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