.Net version variables
For .Net version 6.x and later, the installer uses separate variables for each major version and .Net runtime component: .Net Runtime, .Net Desktop, and ASP.Net Core. This is done because these .Net versions allow the installation of multiple major versions in parallel and applications are typically geared toward one specific major version instead of the highest installed one. The following table shows which variables are available and their interpretation.
Note: to detect the presence of .Net 4.x and earlier, use the VersionCLR variable.
Variable | Purpose | Example value |
---|---|---|
VersionASPCore6x64 | Installed version of ASP.Net Core 6 for x64 | 6.0.36 |
VersionASPCore6x86 | Installed version of ASP.Net Core 6 for x86 | 6.0.36 |
VersionASPCore7x64 | Installed version of ASP.Net Core 7 for x64 | 7.0.20 |
VersionASPCore7x86 | Installed version of ASP.Net Core 7 for x86 | 7.0.20 |
VersionASPCore8a64 | Installed version of ASP.Net Core 8 for arm64 | 8.0.11 |
VersionASPCore8x64 | Installed version of ASP.Net Core 8 for x64 | 8.0.11 |
VersionASPCore8x86 | Installed version of ASP.Net Core 8 for x86 | 8.0.11 |
VersionASPCore9a64 | Installed version of ASP.Net Core 9 for arm64 | 9.0.1 |
VersionASPCore9x64 | Installed version of ASP.Net Core 9 for x64 | 9.0.1 |
VersionASPCore9x86 | Installed version of ASP.Net Core 9 for x86 | 9.0.1 |
VersionNetCore6x64 | Installed version of .Net Runtime 6 for x64 | 6.0.36 |
VersionNetCore6x86 | Installed version of .Net Runtime 6 for x86 | 6.0.36 |
VersionNetCore7x64 | Installed version of .Net Runtime 7 for x64 | 7.0.20 |
VersionNetCore7x86 | Installed version of .Net Runtime 7 for x86 | 7.0.20 |
VersionNetCore8a64 | Installed version of .Net Runtime 8 for arm64 | 8.0.11 |
VersionNetCore8x64 | Installed version of .Net Runtime 8 for x64 | 8.0.11 |
VersionNetCore8x86 | Installed version of .Net Runtime 8 for x86 | 8.0.11 |
VersionNetCore9a64 | Installed version of .Net Runtime 9 for arm64 | 9.0.1 |
VersionNetCore9x64 | Installed version of .Net Runtime 9 for x64 | 9.0.1 |
VersionNetCore9x86 | Installed version of .Net Runtime 9 for x86 | 9.0.1 |
VersionNetDesk6x64 | Installed version of .Net Desktop 6 for x64 | 6.0.36 |
VersionNetDesk6x86 | Installed version of .Net Desktop 6 for x86 | 6.0.36 |
VersionNetDesk7x64 | Installed version of .Net Desktop 7 for x64 | 7.0.20 |
VersionNetDesk7x86 | Installed version of .Net Desktop 7 for x86 | 7.0.20 |
VersionNetDesk8a64 | Installed version of .Net Desktop 8 for arm64 | 8.0.11 |
VersionNetDesk8x64 | Installed version of .Net Desktop 8 for x64 | 8.0.11 |
VersionNetDesk8x86 | Installed version of .Net Desktop 8 for x86 | 8.0.11 |
VersionNetDesk9a64 | Installed version of .Net Desktop 9 for arm64 | 9.0.1 |
VersionNetDesk9x64 | Installed version of .Net Desktop 9 for x64 | 9.0.1 |
VersionNetDesk9x86 | Installed version of .Net Desktop 9 for x86 | 9.0.1 |
Usage
You can refer to these variables as, for example, <VersionNetCore8x64>. In conditional expressions you can omit the brackets and use tests like VersionNetCore8x64 >= 8.0.5 (to test for .Net 8.0.5 or later) or simply VersionNetCore8x64 (to test for the presence of the .Net 8.x runtime for the x64 processor). Do not set this variable directly; it is set automatically when the installer runs.
Related topics
MsiNetAssemblySupport, VersionCLR, System information variables