VersionCLR
The installer sets this variable to the Common Language Runtime (i.e., .Net) version number of the target system if the target system has .Net installed. Otherwise it is set to 0. The CLR version number is encoded as 1000 * major + 10 * minor + sp, as follows:
.Net version | VersionCLR |
---|---|
Not present | 0 |
1.0 | 1000 |
1.1 | 1010 |
2.0 | 2000 |
2.0 SP1 | 2001 |
2.0 SP2 | 2002 |
3.0 | 3000 |
3.1 | 3010 |
3.5 | 3050 |
3.5 SP1 | 3051 |
4.0 | 4000 |
4.5 | 4050 |
4.5.1 | 4051 |
4.5.2 | 4052 |
4.6 | 4060 |
4.6.1 | 4061 |
4.6.2 | 4062 |
Usage
You can refer to it as <VersionCLR>. In conditional expressions you can omit the brackets and use tests like VersionCLR >= 1010 (to test for .Net 1.1 or later) or simply VersionCLR (to test for the presence of .Net). Do not set this variable directly; it is set automatically when the installer runs.
Tip: If you need a more accurate .Net version indicator, use the MsiNetAssemblySupport variable. That variable provides the fully dotted .Net runtime version number, for example 4.6.1055.0