This documentation is archived and is not being maintained.

.NET Framework Launch Condition 

The .NET Framework launch condition is used to check for a specific version of the .NET Framework common language runtime on a target computer during installation.


By default, the .NET Framework runtime is packaged along with your application and at install time it is automatically installed if needed. It is still a good idea to include the launch condition in case a user tries to launch 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 of the form N.N.NNNN (for example, 1.0.3705 or 1.1.4322). The launch condition might not evaluate properly if you enter a version that does not comply with this requirement, for example, 1.0.0.

If a version of the runtime specified in the SupportedRuntimes property is not found, the installation is halted. The user is presented with a Yes / No dialog box containing the text specified in the Message property. If the user chooses Yes, he is 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 point to 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 from where.

See Also