Adding .NET Framework Redistributables to Projects

InstallShield 2020

Project:This information applies to the following project types:

Basic MSI
InstallScript MSI

If your product requires that the .NET Framework be installed on the target system, you can add the .NET Framework redistributable to your project. If the target system does not have the .NET Framework, it is installed during your installation.

You can also include redistributables for .NET Framework language packs in your project. The language packs contain translated text, such as error messages, for languages other than English.

The method for adding the .NET Framework and .NET Framework language packs to your project depends on the project type that you are using, as well as the version of .NET Framework that your product requires.

Note:Some .NET Framework versions include earlier .NET Framework versions:

.NET Framework 3.5 includes .NET Framework 3.0 SP1 and .NET Framework 2.0 SP1.
.NET 3.0 Framework SP1 includes .NET Framework 2.0 SP1.
.NET 3.0 Framework RTM includes .NET Framework 2.0 RTM .

Basic MSI and InstallScript MSI Projects

If you want to include .NET support in a Basic MSI or InstallScript MSI project, add the appropriate Microsoft .NET Framework prerequisite. For more information, see Including the Microsoft .NET Framework and Microsoft .NET Framework Language Pack Prerequisites.

Note:This includes .NET Framework 4.5 Full, 4.5 Web, 4.0 Full, 4.0 Client, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP2, 2.0 SP1, or 2.0 (only x64, IA64) redistributables.

To test whether the .NET Framework is already installed on the target system, you can use the built-in MsiNetAssemblySupport property. It is set to the version of a particular .NET DLL (fusion.dll) if the .NET Framework is installed, and it is not set if the .NET Framework is not installed.

InstallScript Projects

InstallScript projects support two methods for adding the .NET Framework redistributables to your project:

Use the Prerequisites view to add one or more .NET Framework prerequisites to your project.
Use the Objects view to add the Microsoft .NET Framework object to your installation. This object also enables you to add one or more language packs to an InstallScript project. To learn more, see Microsoft .NET Framework Object Wizard.

To determine whether a particular version of the .NET Framework or a language pack is installed, use the Is function and pass the DOTNETFRAMEWORKINSTALLED predefined constant.

Obtaining InstallShield Prerequisites and Objects

Note that some of the InstallShield prerequisites and objects are not installed with InstallShield. You may need to download them. For more information, see Obtaining Updates for InstallShield.

See Also