Good evening

I'm trying to get a simple managed UX example working without much success. The 
resulting EXE keeps loading the prerequisite bootstrapper that wants to install 
.NET 4. The error is:

Loading prerequisite bootstrapper application because managed host could not be 
loaded, error: 0x80131700.

Fusion logging is enabled but I'm not getting anything on this error.

All I get is a window telling me that the Microsoft .NET Framework is required 
with a hyperlink to the license (hyperlink works), "Accept & Install" button, 
and "Decline" button. Decline cancels the install, Accept does nothing (since 
.NET 4 is already installed) and gives the following message in the log:

The prerequisites were already installed. The bootstrapper application will not 
be reloaded to prevent an infinite loop.

I've tried to borrow extensively from the Setup example for WiX 3.6 as managed 
UX is not currently documented.

I have 4 projects in my solution:

- Application to be deployed (uses WPF 4)
- Installer MSI (written in WiX)
- Installer UX DLL (WPF 3.5 Client Profile, compiled to x86, based on WPF User 
Control project)
- Installer EXE (written in WiX, targets Burn)

I've looked for this error message on the WiX list and Google, finding a couple 
of entries but none seem to be what I need, near as I can tell.

Your help would be greatly appreciated. We've got 2 commercial products that 
will use Burn if we can make it work.

Code follows below.

- Shaun


For my UX DLL, the only code I want to run (to prove it's working) is:

  public class InstallerUX : BootstrapperApplication
  {
    protected override void Run()
    {
      MessageBox.Show("Foobar!");
      this.Engine.Quit(0);
    }
  }

I also have a file "InstallerUX.BootstrapperCore.config" with the following:

<?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="v3.5" />
    <!--<supportedRuntime version="v4.0" />-->
    <!-- supportedRuntime version="v2.0.50727" / -->
  </startup>
  <wix.bootstrapper>
    <host assemblyName="InstallerUX">
      <supportedFramework version="v4\Full" />
      <supportedFramework version="v4\Client" />
    </host>
  </wix.bootstrapper>
</configuration>

My bootstrapper project references WixBalExtension and WixUtilExtension. It 
contains two files. The following is the code for Bundle.wxs:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>

  <Bundle
    Name="Burn Test App"
    Version="1.0.0.0"
    Manufacturer="Omnivex"
    UpgradeCode="{306FA343-3D03-46AB-9BAB-A4E64F0AEBC7}"
    SplashScreenSourceFile='!(wix.GraphicsPath)\SplashScreen.bmp' >

    <!--<BootstrapperApplicationRef 
Id="WixStandardBootstrapperApplication.RtfLicense">-->
    <BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'>
      <Payload Name='BootstrapperCore.config' 
SourceFile='!(wix.UXPath)\InstallerUX.BootstrapperCore.config' Compressed='no' 
/>
      <Payload SourceFile='!(wix.UXPath)\InstallerUX.dll' Compressed='yes' />
      <Payload SourceFile='!(wix.LicensePath)\License.rtf' Compressed='yes' />
      <Payload SourceFile='!(wix.NETFX40Path)\NetfxLicense.rtf' 
Compressed='yes' />
    </BootstrapperApplicationRef>

    <Chain DisableRollback='yes'>
      <PackageGroupRef Id='Netfx4Full' />
      <MsiPackage Id='BurnTestAppMsi' Compressed='yes' Vital='yes' 
Name='BurnTestApp.msi' SourceFile='!(wix.MSIPath)\BurnTestApp.msi' />

      <!-- Note: The following PackageGroupRef is required to pull in generated 
authoring from project references. -->
      <PackageGroupRef Id="Bundle.Generated.Packages"/>
    </Chain>
  </Bundle>
</Wix>

This is the code for Netfx.wxs (lifted and slightly modified from the WiX Setup 
project):

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"; 
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension";>
  <Fragment>
    <WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" />
    <WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />

    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework 
Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework 
Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" 
/>

    <PackageGroup Id="Netfx4Full" >
      <ExePackage
        Id="Netfx4Full"
        Cache="no"
        Compressed="yes"
        PerMachine="yes"
        Permanent="yes"
        Vital="yes"
        Name="dotNetFx40_Full_x86_x64.exe"
        SourceFile="!(wix.NETFX40Path)\dotNetFx40_Full_x86_x64.exe"
        
DownloadUrl="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe";
        DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR 
Netfx4x64FullVersion)" />

    </PackageGroup>
  </Fragment>
</Wix>

And here is the complete log when choosing "Accept & Install":

[1B6C:1908][2011-08-24T19:36:39]: Burn v3.6.2005.0, path: C:\Code\Junk\WiX Burn 
Test\Bootstrapper\BurnTestApp.exe, cmdline: '-burn.unelevated 
BurnPipe.{FC6E1C99-FDC3-45A5-AAD6-D1A4DF05CEC3} 
{BB369DAB-5562-4C10-9F41-E825E5387948} 8312'
[1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleName' to 
value 'Burn Test App'
[1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleLog' to 
value 'C:\Users\shayward\AppData\Local\Temp\Burn_Test_App_20110824193639.log'
[1B6C:1908][2011-08-24T19:36:39]: Setting string variable 
'WixBundleOriginalSource' to value 'C:\Code\Junk\WiX Burn 
Test\Bootstrapper\BurnTestApp.exe'
[1B6C:1908][2011-08-24T19:36:39]: Loading prerequisite bootstrapper application 
because managed host could not be loaded, error: 0x80131700.
[1B6C:1908][2011-08-24T19:36:39]: Detect 2 packages
[1B6C:1908][2011-08-24T19:36:39]: Setting string variable 
'Netfx4x64FullVersion' to value '4.0.30319'
[1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'Netfx4FullVersion' 
to value '4.0.30319'
[1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: 
{27534f2f-d280-41db-89e7-3ce239f92868}, scope: PerMachine, version: 1.0.0.0, 
operation: None
[1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: 
{4ef0a57c-3163-4c20-b3ac-d52765c48b2a}, scope: PerMachine, version: 1.0.0.0, 
operation: None
[1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: 
{51a6376f-c388-4fe9-ac42-4f2b6c7fa97e}, scope: PerMachine, version: 1.0.0.0, 
operation: None
[1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: 
{531d9bbf-1dd3-4daa-8875-6942e4c68f96}, scope: PerMachine, version: 1.0.0.0, 
operation: None
[1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: 
{5886e912-81ec-43ca-8701-84e4dc91e5df}, scope: PerMachine, version: 1.0.0.0, 
operation: None
[1B6C:1908][2011-08-24T19:36:39]: Condition 'Netfx4FullVersion AND (NOT 
VersionNT64 OR Netfx4x64FullVersion)' evaluates to true.
[1B6C:1908][2011-08-24T19:36:39]: Detected package: Netfx4Full, state: Present, 
cached: No
[1B6C:1908][2011-08-24T19:36:39]: Detect 1 msi features for package: 
BurnTestAppMsi
[1B6C:1908][2011-08-24T19:36:39]: Detected feature: FEAT_Application, state: 
Absent
[1B6C:1908][2011-08-24T19:36:39]: Detected package: BurnTestAppMsi, state: 
Absent, cached: Yes
[1B6C:1908][2011-08-24T19:36:39]: Detect complete, result: 0x0
[1B6C:1908][2011-08-24T19:42:19]: Plan 2 packages, action: Install
[1B6C:1908][2011-08-24T19:42:19]: Planned package: Netfx4Full, state: Present, 
default requested: Present, ux requested: Present, execute: None, rollback: 
None, cache: Yes, uncache: Yes, dependency: Register
[1B6C:1908][2011-08-24T19:42:19]: Planned package: BurnTestAppMsi, state: 
Absent, default requested: Present, ux requested: None, execute: None, 
rollback: None, cache: No, uncache: No, dependency: Unregister
[1B6C:1908][2011-08-24T19:42:19]: Plan complete, result: 0x0
[1B6C:1908][2011-08-24T19:42:19]: Apply begin
[2078:2A28][2011-08-24T19:42:19]: Caching executable from: 'C:\Code\Junk\WiX 
Burn Test\Bootstrapper\BurnTestApp.exe' to: 'C:\ProgramData\Package 
Cache\{0e4edf15-3575-44b1-be10-c4748c9ae7d6}\BurnTestApp.exe'
[2078:2A28][2011-08-24T19:42:19]: Registering bundle dependency key: 
{0e4edf15-3575-44b1-be10-c4748c9ae7d6}, version 1.0.0.0
[2078:241C][2011-08-24T19:42:19]: Caching payload from working path 
'C:\Users\shayward\AppData\Local\Temp\Netfx4Full' to path 
'C:\ProgramData\Package 
Cache\58DA3D74DB353AAD03588CBB5CEA8234166D8B99\dotNetFx40_Full_x86_x64.exe'
[2078:2A28][2011-08-24T19:42:19]: Removing cached package: 
58DA3D74DB353AAD03588CBB5CEA8234166D8B99, from path: C:\ProgramData\Package 
Cache\58DA3D74DB353AAD03588CBB5CEA8234166D8B99\
[1B6C:1908][2011-08-24T19:42:19]: Apply complete, result: 0x0 restart: No
[1B6C:1908][2011-08-24T19:42:19]: Shutting down, exit code: 0x0
[1B6C:1908][2011-08-24T19:42:19]: The prerequisites were already installed. The 
bootstrapper application will not be reloaded to prevent an infinite loop.

The information in this e-mail is intended solely for the addressee and access 
by anyone else is unauthorized.  Omnivex accepts no liability for the content 
of this e-mail, or for the consequences of any actions taken on the basis of 
the information provided. Any views or opinions presented in this e-mail are 
solely those of the author and do not necessarily represent those of the 
company.   Omnivex makes no warranties, express or implied and is not 
responsible for errors or omissions.

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to