Question

I stumbled upon this documentation. http://wix.sourceforge.net/manual-wix3/wixnetfxextension.htm.

I can't figure out how to install for example .net4full when it is not installed.

Currently my wix xml looks like this:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
    <Product Id="*"
      .....
      .........
    >
        <PropertyRef Id="NETFRAMEWORK40FULL"/>
        <Condition Message="This application requires .NET Framework 4 FULL. Please install the .NET Framework then run this installer again.">
        <![CDATA[Installed OR NETFRAMEWORK40FULL]]>
        </Condition>
        .....
        .........
        ............
        .........
        ............
    </Product>

    .......................
    ..............................
    ................................
    .........................
</Wix>

BTW, I'm using wix 3.7!

Was it helpful?

Solution

In the Wix setup project, you can check the existence of .net framework 4.0 and give a message to user like you have to install .net framework 4.0 before install this product. But if you want to do silently (Check .net framework 4.0 existence...if available install only your product and if not first install .net framework 4.0 and then install your product) You have to do by wix bootstrapper

OTHER TIPS

Sample Bootstarpper code as follows

  <?xml version="1.0" encoding="utf-8"?>
   <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
        xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
          xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">

   <Bundle
     Name="My Application" Version="1.0.0.0"  UpgradeCode="8DA460D6-B4CB-4ED0-A1FE- 44F269070647" Manufacturer="ABC">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
  <bal:WixStandardBootstrapperApplication LicenseFile="Agreement.rtf"
           LogoFile="App.ico"/>
</BootstrapperApplicationRef>
<Chain> 
<PackageGroupRef Id="Netfx45Xxx"/>
     <MsiPackage SourceFile="D\MySetup.msi" Compressed="yes" EnableFeatureSelection="yes" Vital="yes">
     <MsiProperty Name='INSTALLFOLDER' Value='[InstallFolder]'/>      
  </MsiPackage> 
</Chain>
 <Variable Name='InstallFolder' Value='[ProgramFilesFolder]MyApp' />    

 <Fragment>
<PackageGroup Id="Netfx45Xxx" >
  <ExePackage Id="Netfx45Xxx" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes" InstallCommand="/q"
      SourceFile="dotnetfx45_full_x86_x64.exe"
      DetectCondition="(Netfx4FullVersion=&quot;4.5.50709&quot;) AND (NOT VersionNT64 OR (Netfx4x64FullVersion=&quot;4.5.50709&quot;))"
      InstallCondition="(VersionNT >= v6.0 OR VersionNT64 >= v6.0) AND (NOT (Netfx4FullVersion=&quot;4.5.50709&quot; OR Netfx4x64FullVersion=&quot;4.5.50709&quot;))"/>
</PackageGroup>

This code attach the .net version with itself. If the .net 4.5 is not available in the machine, it will install the framework before install the application setup

The solution for me, using .NET 5 was to include the [ApplicationName].runtimeconfig.json in the application folder.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top