0
votes

I have a wix bundle project that I am editing (ver 3.10). I am trying to use the wixnetfxextensions to install .net framework 4.6 if it is not already installed. I created an exepackage that uses the WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED property. I'm guessing I am not using this correctly. Any help on how to use that? Currently the .net framework will not install not matter what.

  <Chain>
      <PackageGroupRef Id="redist_vc140" />
      <PackageGroupRef Id="NetFx461Full" />
      <MsiPackage Id="MSI_Installer" SourceFile="C:\Installer.msi"/>
  </Chain>

  <Fragment>
      <PropertyRef Id="WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED"/>
      <!-- Install .NET 4.6.1 -->
      <PackageGroup Id="NetFx461Full">
          <ExePackage Id="NetFx461"
           DisplayName="Microsoft .NET Framework 4.6.1"
           Compressed="no"
           Cache="yes"
           PerMachine="yes"
           Permanent="yes"
           Protocol="netfx4"
           Vital="yes"
           SourceFile="..\NDP461-KB3102436-x86-x64-AllOS-ENU.exe"
           UninstallCommand="/q /norestart"
           RepairCommand="/q /norestart"
           DetectCondition="NOT WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED" />
       </PackageGroup>  
  </Fragment>  
2

2 Answers

1
votes

You're doing a lot of extra work to install .net that you don't actually need to do.

To add .net 461 to your installer just include the netfxextension and add

<Bundle>
    <PayloadGroup Id="NetFx461RedistPayload">
        <Payload Name="redist\NDP461-KB3102436-x86-x64-AllOS-ENU.exe"
             SourceFile="C:\path\to\redists\in\repo\NDP461-KB3102436-x86-x64-AllOS-ENU.exe"/>
    <PayloadGroup/>
</Bundle>

so that the full installer is included in your bootstrapper. You can ignore this and then the bootstrapper will download the installer but if the customer doesn't have an internet connection they won't be able to install .net.

Then in your chain just add

<PackageGroupRef Id="NetFx461Redist"/>

I used this as a reference and checked the wix source to see what the name of .net 461 being used is in netfxextension.


Sean Hall mentioned that bundles don't even use properties so what I had written here doesn't apply at all in this situation. (And it was also incorrect)

0
votes

Did what Brian Sutherland suggested: Added the WxsVariable that compares the .netframework with the determined minimum release number. then make that a detectcondition in the exepackage