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

4

希望您一切顺利 :)

我正在学习关于 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)。这就是我发布新帖子的原因。

我希望有人能够帮忙解决这个问题。谢谢!

1个回答

7

所以,就像我说的那样,我看到了太多的帖子寻求帮助但是没有解决方案。不过,在经过整整一天的研究后,我发现UI MVVM库类和引导程序应用必须使用Release x86编译。我之前正在使用x64编译,因为我的msi是基于这种架构构建的。

我希望这对其他人有所帮助。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接