How to add .NET Framework as a prerequisite

Written by Radu Popescu · December 23rd, 2022 · 4min read

It is well known that whenever you install a .NET application, you need to add a .NET Framework prerequisite to your installation package.

In this article, we’ll touch on:

  • What is a .NET Framework?
  • How to get the .NET Framework?
  • How to add the .NET Framework as a prerequisite to your installation package?
  • Why add .NET Framework as a pre-install prerequisite in Advanced Installer?

What is a .NET Framework?

.NET Framework is a software development platform used for creating and running Windows applications.

The reason we add the .NET Framework as a prerequisite to the installation package is to make sure the end-user can run the application successfully after it is installed.

How to get the .NET Framework?

The very first thing you need to know is the .NET Framework. Plus, a .NET version is preinstalled on the majority of modern Windows 10 editions. However, if you need a newer or a specific version of a .NET Framework, you can get it from the official Microsoft website.

How to add the .NET Framework as a prerequisite to your installation package using Advanced Installer?

To add .NET Framework as a prerequisite using Advanced Installer, follow these steps:

1. Go to the Prerequisites tab and select one of the ".NET Framework" predefined prerequisites.

.NET Framework Predefined Prerequisites

You will be prompted with the below message. As a best practice, choose “Yes”. This way, the install wizard will install the package in offline mode (no need for an internet connection).

Download and Include Prerequisite in Package

2. Use the "Minimum version" and "Maximum version" fields to set the minimum and maximum versions of the .NET Framework version required (this will be shown to the user and does not affect the prerequisite).

.NET Minimum and Maximum Versions Required

3. The "Location" combo can be left at its default value.

Setup Files Location

NoteIn case you chose “NO” when the prerequisite was added and went for the “download” prerequisite during the installation, the "URL" field needs to contain a URL that points to the installation package of the .NET Framework version needed by your application.
To make sure the URL is correct, you can test it by pasting it into an Internet Explorer browser (it should show you the Internet Explorer's "Save As..." dialog with the "Run", "Save" and "Cancel" options).

4. You can leave the "Folder" field as is, or set it to where the prerequisite files will be placed, extracted, or downloaded.

Main Setup File Folder

NoteFor download from URL prerequisite use the [ Browse... ] button in the "Integrity Check" section to select the .NET Framework installation package you want to add as a prerequisite after selecting it, the "Exact Size" and "MD5" fields are populated automatically.

Download from URL Prerequisite

5. The "Install Command Lines" section sets the command line parameters you want to pass to the .NET Framework installation package.

Install Command Lines

You can leave this section empty or you can add silent parameters for all the fields so the prerequisite is installed automatically.

6. Use the "Install Conditions" tab to select the Windows platforms on which the prerequisite can be installed. You don't need to modify the predefined search in the "Search" section because it has been configured automatically.

Select Windows Platforms for Prerequisites Installation

That’s it! All you have to do is build your package, and your prerequisites will be installed during the installation of your application.

Why should you add .NET Framework as a pre-install prerequisite in Advanced Installer?

Advanced Installer offers three ways you can add prerequisites to your main package:

  1. Pre-Install: Install an additional package before your main application is installed.
  2. Feature-based: Install an additional package as a feature. This happens when your installer offers the option for the user to select which features or your application he chooses to install.
  3. Post-Install: Install an additional package after your main application is installed.

.NET Framework and other applications, such as Visual C++ Redist, fall into the category of prerequisites that, as a best practice, should be installed before installing your main application.

We follow this recommendation since some components of your main application depend directly on the resources contained by the prerequisites.

Conclusion

.NET Framework is a piece of software that many applications depend on.

Thanks to Advanced Installer, you can effortlessly add the .NET framework directly to your application, using its predefined list of prerequisites.

Have you tried Advanced Installer’s predefined support for prerequisites yet? Let us know in the comments section below.

Subscribe to Our Newsletter

Sign up for free and be the first to receive the latest news, videos, exclusive How-Tos, and guides from Advanced Installer.

Comments: