jpa*_*o27 4 c# user-interface wix bootstrapper
我希望你一切都好:)
所以,我正在做一些关于 Burn、Bootstrapper 工具的 wix 教程。
我尝试构建自己的 UI(按照本教程),当我想运行它时,它崩溃了。
我已将其包含到我的 AsseblyInfo.cs 中
[assembly: BootstrapperApplication(
typeof(CustomBootstrapperApplication))]
Run Code Online (Sandbox Code Playgroud)
这是我的 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>
Run Code Online (Sandbox Code Playgroud)
我的库类称为 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
Run Code Online (Sandbox Code Playgroud)
我已经挣扎了好几天了。我可以看到这个问题是多年前出现的,但没有人为新版本的 netframework 4.8 和 wix 3.11 提供解决方案(我认为这是问题所在,因为我遵循的教程使用 NetF 3.5 和 Wix 3.6 我认为https ://learning.oreilly.com/library/view/wix-36-a/9781782160427/ch16s07.html)。这就是我提出新帖子的原因。
我希望有人能帮助我解决这个问题。亲切的问候 :)
所以,就像我说的,我也看到过,我的意思是有太多帖子寻求帮助而没有解决方案。然而,一整天后,我发现 UI MVVM 库类和引导程序应用程序必须使用 Release x86 进行编译。我使用 x64 进行编译,因为我的 msi 是用这样的架构构建的。
我希望它对其他人有帮助。