无法加载Wix托管主机

无法加载Wix托管主机,wix,wix3.10,Wix,Wix3.10,我已经在VisualStudio2015中制作了一个超级简单的wix引导程序和安装项目(并在2013年进行了尝试,获得了相同的结果)。引导程序将发布一个消息框并退出,但我收到一个错误“加载必备引导程序应用程序,因为无法加载托管主机,错误:0x80070490”。我不知道该错误代码的含义 它将直接尝试安装已经存在的.NET4.5,然后退出 我有指向正确类的程序集的BootstrapperApplicationAttribute。bootstrapper应用程序是一个.Net 4.5 WPF用户控制

我已经在VisualStudio2015中制作了一个超级简单的wix引导程序和安装项目(并在2013年进行了尝试,获得了相同的结果)。引导程序将发布一个消息框并退出,但我收到一个错误“加载必备引导程序应用程序,因为无法加载托管主机,错误:0x80070490”。我不知道该错误代码的含义

它将直接尝试安装已经存在的.NET4.5,然后退出

我有指向正确类的程序集的BootstrapperApplicationAttribute。bootstrapper应用程序是一个.Net 4.5 WPF用户控制库

这是完整的日志 编辑:包含最近更改的最新日志

[3AB8:2C8C][2015-09-10T14:44:59]i001: Burn v3.10.0.2026, Windows v6.3 (Build 9600: Service Pack 0), path: E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\Bootstrapper1.exe
[3AB8:2C8C][2015-09-10T14:44:59]i009: Command Line: '/log log.txt'
[3AB8:2C8C][2015-09-10T14:44:59]i000: Setting string variable 'WixBundleLog' to value 'E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\log.txt'
[3AB8:2C8C][2015-09-10T14:44:59]i000: Setting string variable 'WixBundleOriginalSource' to value 'E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\Bootstrapper1.exe'
[3AB8:2C8C][2015-09-10T14:44:59]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\'
[3AB8:2C8C][2015-09-10T14:44:59]i000: Setting string variable 'WixBundleName' to value 'Bootstrapper1'
[3AB8:2C8C][2015-09-10T14:44:59]i000: Setting string variable 'WixBundleManufacturer' to value 'Myself'
[3AB8:2C8C][2015-09-10T14:44:59]i000: Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80070490.
[3AB8:3C74][2015-09-10T14:44:59]i000: Setting numeric variable 'WixStdBALanguageId' to value 1033
[3AB8:3C74][2015-09-10T14:44:59]i000: Setting version variable 'WixBundleFileVersion' to value '1.0.0.0'
[3AB8:2C8C][2015-09-10T14:44:59]i100: Detect begin, 2 packages
[3AB8:2C8C][2015-09-10T14:44:59]i000: Setting string variable 'NETFRAMEWORK45' to value '393297'
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {14998a68-ae2d-4209-b77e-a3f04dd57a37}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {1e5997c3-1ce9-4ba9-b0dd-8b23dbc2ae5b}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {464b46a0-9c95-4a9a-a09c-cc05eabded4e}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {5b9e54c5-39fe-4438-9d7a-5d97ace1a57f}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {5e80916f-30ff-4791-97df-a503198504c5}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {6c9fdff8-7e6b-4365-8509-18fc5394599e}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {97cba9a5-0ec5-40cc-ac89-30e790e81755}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {b4cc8c31-ee10-4566-a13d-7a8ab7c77ea9}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {d51bb1d2-e28b-467d-ac56-7dcf93a9b838}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {fc6f26ca-2fa0-426d-acdb-bb350bc7a3db}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
[3AB8:2C8C][2015-09-10T14:44:59]i052: Condition 'NETFRAMEWORK45 >= 378389' evaluates to true.
[3AB8:2C8C][2015-09-10T14:44:59]i101: Detected package: NetFx45Redist, state: Present, cached: None
[3AB8:2C8C][2015-09-10T14:44:59]i101: Detected package: SetupProject1.msi, state: Absent, cached: None
[3AB8:2C8C][2015-09-10T14:44:59]i199: Detect complete, result: 0x0
[3AB8:2C8C][2015-09-10T14:45:03]i500: Shutting down, exit code: 0x642
[3AB8:2C8C][2015-09-10T14:45:03]i000: The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop.
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: NETFRAMEWORK45 = 393297
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleAction = 5
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleElevated = 0
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleFileVersion = 1.0.0.0
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleInstalled = 0
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleLog = E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\log.txt
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleManufacturer = Myself
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleName = Bootstrapper1
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleOriginalSource = E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\Bootstrapper1.exe
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleOriginalSourceFolder = E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleProviderKey = {0112e2c7-f979-4afe-a3fd-6be0231f6727}
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleTag = 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleVersion = 1.0.0.0
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixStdBALanguageId = 1033
[3AB8:2C8C][2015-09-10T14:45:03]i007: Exit code: 0x642, restarting: No
编辑:这里是BootstrapperApplicationRef部分。我已经尝试过使用和不使用BootstrapperCore.dll和Microsoft.Deployment.WindowsInstaller.dll。除了标准的.Net库之外,bootstrapper应用程序没有其他依赖项

<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
  <Payload Name='BootstrapperCore.config' SourceFile="..\VerySimpleBurnApp\VerySimpleBurnApp.BootstrapperCore.config"/>
  <Payload SourceFile="..\VerySimpleBurnApp\bin\Release\VerySimpleBurnApp.dll"/>
  <Payload SourceFile="..\VerySimpleBurnApp\bin\Release\BootstrapperCore.dll"/>
  <Payload SourceFile="..\VerySimpleBurnApp\bin\Release\Microsoft.Deployment.WindowsInstaller.dll"/>
</BootstrapperApplicationRef>

以及VerySimpleBurnApp.BootstrapperCore.config 编辑:更新为当前版本

<?xml version="1.0" encoding="utf-8" ?>
<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" sku=".NETFramework,Version=v4.5" />
  </startup>
  <wix.bootstrapper>
    <host assemblyName="VerySimpleBurnApp">
      <supportedFramework version="v4.5" />
    </host>
  </wix.bootstrapper>
</configuration>

对于.NET 4.5,
supportedRuntime
元素需要如下所示:

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />


此外,.NET 4.5似乎不支持
supportedFramework
元素,需要删除它们。

请提供Bundle.wxs(特别是BootstrapperApplicationRef元素)、BootstrapperCore.config和BA.0x80070490的目标.NET Framework版本,它们的意思是“找不到元素”,如果有帮助的话。(
net helpmsg 1168
-十进制表示十六进制0490-对原始文本的web搜索似乎是一致的。)BA的目标框架是什么?是4.5.1还是4.5.2还是4.6?对不起,我错过了。我更新了我的答案。好的,更改了,但仍然有相同的错误代码,并且似乎仍然没有检测到安装了.NET。感谢您的帮助,但我仍然收到相同的错误。在我的情况下,配置文件没有被包括在内,但问题和您的答案让我解决了问题。