Mel
Posts: 43
Joined: Fri Jul 10, 2020 10:59 am

How can i put a prerequisite before the user installs ?

Wed Jul 07, 2021 11:09 pm

Hi
I have a requirement that the user needs to have a minimum of .net 4.7 before they install.
How can i put that prerequisite so that the installer does not continue unless the version of .net is 4.7 or higher ?

I dont want them to get an error :

"An unhandled Microsoft.net framework exception occurred ..."

thanks

Catalin
Posts: 6537
Joined: Wed Jun 13, 2018 7:49 am

Re: How can i put a prerequisite before the user installs ?

Thu Jul 08, 2021 12:22 pm

Hello Mel,

In order to install .NET Framework before installing the main package, all you need to do is add it as a pre-install prerequisite.

If the version of .NET Framework on the respective machine will be lower than 4.7, then the 4.7 version will be installed.
How can i put that prerequisite so that the installer does not continue unless the version of .net is 4.7 or higher ?
Normally, this could be done by unchecking the "Continue with main installation even if the prerequisite was not installed" option.

However, I would advise against this, because the .NET Framework installation is a little bit strange.

Normally, that option will check the "Install Conditions" once again after the prerequisite is installed. In case of .NET Framework, the install condition is a registry query. This would work fine with pretty much every prerequisite, however .NET Framework updates the registry entries only after a reboot, meaning that the check will fail, resulting in an error.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”