.NET Framework Launch Condition

When an application to be installed depends on the .NET Framework, a custom action (CheckFX) in the Windows Installer checks the runtime version of the .NET Framework on the target computer, and sets a launch condition based on the result. The .NET Framework launch condition property Version in the Setup project specifies the exact runtime version that the installer requires on the target computer before it installs the application. For more information about Version, see Version Property (Launch Conditions).

For more information about how to add a .NET Framework launch condition, see How to: Add Predefined Launch Conditions.


By default, the .NET Framework runtime is packaged together with your application and is automatically installed with the application if it is required. It is still a good idea to include the launch condition in case a user tries to run the .msi file directly, bypassing the bootstrapper. For more information, see Deploying Prerequisites (Visual Studio).


If you are using Visual Studio 2003 or earlier, you must enter a valid .NET Framework version number in the form N.N.NNNN or N.N.NNNNN (for example, 1.0.3705 or 2.0.50727). The launch condition might not evaluate correctly if you enter a version number that does not comply with this requirement, for example, 1.0.0.

If a version of the .NET Framework runtime specified in the SupportedRuntimes property is not found, the installation is stopped. The user is presented with a Yes or No dialog box that contains the text specified in the Message property. Users who choose Yes are redirected to the location specified in the InstallUrl property. (The default is a Microsoft Support Web site that contains a downloadable copy of the .NET Framework redistributable file, but you should specify a location that contains the specific version required by your application.)

In many cases, you will want to modify the InstallUrl property to specify your own location for the redistributable file. For example, if you are distributing your application on CD-ROM, you should include the redistributable file on the CD and change the InstallUrl property to a relative file path. If you change the InstallUrl property, you should also change the Message property to explain what is being installed and the location from which it is being installed.

Community Additions