Wix Managed host could not be loaded

5

I've made a super simple wix bootstrapper and install project in Visual Studio 2015 (and tried this in 2013 with the same result). The bootstrapper will post a message box and quit, but I'm getting an error "Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80070490." and I have no idea what that error code means.

It is going straight to trying to install .Net 4.5 which already exists, and then it exits.

I do have the BootstrapperApplicationAttribute for the assembly which is pointed to the proper class. The bootstrapper app is a .Net 4.5 WPF user control library.

Here's the full log Edit: latest log with the recent changes

[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

Edit: Here's the BootstrapperApplicationRef section. I've tried it with and without the BootstrapperCore.dll and the Microsoft.Deployment.WindowsInstaller.dll. There are no other dependencies for the bootstrapper app beyond the standard .Net libraries

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

And the VerySimpleBurnApp.BootstrapperCore.config Edit: updated to current

<?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>
wix
wix3.10
asked on Stack Overflow Sep 8, 2015 by The Grand User • edited Sep 10, 2015 by The Grand User

1 Answer

3

For .NET 4.5, the supportedRuntime element needs to look like this:

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

Also, it seems that supportedFramework elements aren't supported for .NET 4.5, they need to be removed.

answered on Stack Overflow Sep 10, 2015 by Sean Hall • edited Sep 15, 2015 by Sean Hall

User contributions licensed under CC BY-SA 3.0