[wix-users] Fwd: Bootstrapper Bundle Link Error

Todd Hoatson todd.hoatson at gmail.com
Tue Sep 22 12:41:16 PDT 2020


Hi,
  in my continuing quest to reduce duplication in our installer code, I
have changed our code from having 2 bundle files (one for including
prerequisites in the installer, the other for downloading them at install
time), to having only 1 bundle file with 2 associated fragments.  So I
compile and link the bundle twice, using a different fragment file for each.

When I run light.exe (both times), I get the following error:

UAFrameworkBundle.wxs(33) : error LGHT0094 : Unresolved reference to symbol
'ChainPackageGroup:NetFx48' in section 'Bundle:UsefulApp 9.1'.

I can't see what is wrong with the code.  Can anyone else see what is wrong
here?

Here's the relevant code...

UAFrameworkBundle.wxs:

    <?xml version="1.0"?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
         xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
         xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
         xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
         xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension">
      <Bundle Name='UsefulApp $(var.TruncatedVersion)'
Version='$(var.VersionNumber)'
          UpgradeCode='$(var.UpgradeCode)' Tag='UA9FrmwrkBndl'
          IconSourceFile='.\resources\UA Installer.ico'
          Copyright="Copyright ©2020, Useful Partners"
          Manufacturer="Useful Partners">

        <bal:Condition Message="32-bit Windows is no longer supported.">
(VersionNT64 >= v6.0) </bal:Condition>

        <BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.HyperlinkLicense">
          <Payload SourceFile="UALicense.htm" />
        </BootstrapperApplicationRef>

        <WixVariable Id="WixStdbaLicenseUrl" Value="UALicense.htm" />
        <WixVariable Id="WixStdbaLogo"
Value=".\resources\image_option_1.bmp" />
        <WixVariable Id="WixStdbaThemeXml" Value="UAHyperlinkTheme.xml" />
        <WixVariable Id="WixStdbaThemeWxl" Value="UAHyperlinkTheme.wxl" />

        <Chain>
          <PackageGroupRef Id="NetFx48" />
          <PackageGroupRef Id="redist_vc14" />
          <RollbackBoundary />
          <PackageGroupRef Id='UAFrameworkPackGroup'/>
        </Chain>
      </Bundle>

      <Fragment Id='UAFrag'>
        <PackageGroup Id='UAFrameworkPackGroup'>
          ...
        </PackageGroup>

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

UAFrameworkOfflineFrag.wxs (UAFrameworkOnlineFrag.wxs is similar):

    <?xml version="1.0"?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
         xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
      <Fragment>
        <PackageGroup Id="Netfx48">
          <ExePackage Id="Netfx48" Cache="no" Compressed="yes"
PerMachine="yes" Permanent="yes"
            Vital="yes" InstallCommand="/q /norestart"
            SourceFile=".\libs\ndp48-x86-x64-allos-enu.exe"
            DetectCondition="(Netfx48FullVersion="4.8.03761") AND
(NOT VersionNT64 OR (Netfx48x64FullVersion="4.8.03761"))"
            InstallCondition="(VersionNT >= v6.0 OR VersionNT64 >= v6.0)
AND (NOT (Netfx48FullVersion >= "4.8.03761" OR
Netfx48x64FullVersion >= "4.8.03761"))">
            <ExitCode Behavior="forceReboot" Value="1641" />
            <ExitCode Behavior="forceReboot" Value="3010" />
            <ExitCode Behavior="error" Value="5100" />
            <ExitCode Behavior="error" Value="1603" />
            <ExitCode Behavior="success" Value="0" />
          </ExePackage>
        </PackageGroup>
      </Fragment>

      <Fragment>
        <util:RegistrySearch
          Root="HKLM"
Key="SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64"
          Variable="CPP2017Redist" Value="Installed" Result="value"/>

        <PackageGroup Id="redist_vc14">
          <ExePackage Id="vc14" Cache="no" PerMachine="yes" Vital="yes"
Compressed="yes" Permanent="yes"
            SourceFile=".\libs\vcredist_2017_x64.exe"
            InstallCommand="/quiet /norestart"
            DetectCondition="CPP2017Redist" />
        </PackageGroup>
      </Fragment>
    </Wix>

I compile & link them with:
  candle.exe -arch x64 -dVersionNumber=%Version%
-dUpgradeCode=%UPGRADECODEGUID% -dTruncatedVersion=%TRUNCATEDVERSION% -ext
WixUtilExtension -ext WixBalExtension -ext WixUIExtension -ext
WixNetFxExtension -ext WixDependencyExtension UAFrameworkOfflineFrag.wxs
UAFrameworkBundle.wxs
  light.exe -ext WixUIExtension -ext WixBalExtension -ext WixUtilExtension
-ext WixNetFxExtension -ext WixDependencyExtension -out
UsefulApp_%Version%_InstallerOffline.exe UAFrameworkOfflineFrag.wixobj
UAFrameworkBundle.wixobj

Todd Hoatson
Mobile: 763-291-3312
Email:   todd.hoatson at gmail.com
www.linkedin.com/in/toddhoatson


More information about the wix-users mailing list