How to download and install the .NET Framework using Wix Installer?
Asked Answered
D

2

7

We have an Application that depends on an installed .NET Framework 4.5. The Wix setup should automatically detect when an .NET Framework 4.5 (or greater) is not installed. That works fine with the following wix declaration:

<PropertyRef Id="NETFRAMEWORK45"/>
<Condition Message=".NET Framwork 4.5 is not installed.">
    <![CDATA[Installed OR NETFRAMEWORK45]]>
</Condition>

Our Target: The Wix Setup should automatically download and install the .Net Framework 4.5. It seem, that 'burn' provides a mechanism, that let the setup install the .NET Framwork automatically: http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_dotnet.html. The documentation defines references to Setup files of the .NET Framework:

<MsiPackage Id="MyApplication" SourceFile="$(var.MyApplicationSetup.TargetPath)"/>

But we not want to add the .NET Framework into our Setup. The setup should automatically download it on the target system where the setup will be executed.

How can we achieve this?

Desimone answered 17/4, 2018 at 8:3 Comment(0)
E
1

Please see the NetFx45Web package group ref:

http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html

For more information on how this works if you didn't have the package group ref see a similar example:

Web download of vcruntime140 with wix burn

Everhart answered 17/4, 2018 at 20:2 Comment(0)
F
1

Microsoft allows you to redistribute their framework but only in its original form. This also means that you can't build the framework into your own .msi package.

What you can do is to provide a separate bootstrap installer, Setup.exe, that looks for the installed framework and starts your .NET Framework redistributable.

If you have found a way to do this without using a Bootstrap installer, please let me know.

Fibre answered 9/10, 2019 at 6:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.