This topic is a how to.
Please continue it as clear and simple as possible. Avoid speculative discussions likewise as a deep swoop into underlying mechanisms or related technologies.

Table of Contents

  • Introduction
  • The Microsoft.Net\Framework Folder
  • Registry Keys
  • Determining the .Net Framework Version by Script
  • Determining the .Internet Framework Version by Code
  • The CLRVER Tool
  • Other Languages
    • Italian (it-IT)

Introduction

You can install and run multiple versions of the .NET Framework on a figurer and each version can be installed in any lodge.
Starting from Windows XP, the operating system comes with a .NET Framework version installed and ready for use; the user tin install a more recent version to get all the advantages that comes with the newest class libraries and namespaces provided by the most recent versions of the .Cyberspace Framework.

↑ Dorsum to top

The Microsoft.Net\Framework Binder

Each .Cyberspace Framework version can exist installed side-by-side and each version's files will exist installed into a subfolder of the Windows primary directory, identified by the surroundings variable %WINDIR%. To see which versions are installed, expect into the %WINDIR% directory for the Microsoft.NET\Framework binder (you should also view the Framework64 directory if you're running a 64-bit operating arrangement, which tin have 32 or 64-bit versions installed or both): each version of the .NET Framework has a directory and the beginning two digits of the directory name identify the .Internet Framework version; for instance: v1.1.4322 for the .Cyberspace Framework 1.i, v2.0.50727 for the .NET Framework 2.0, v3.5 for the .Internet Framework 3.five and so on.
Figure 1 depicts the folders containing the files for multiple .Internet Framework version installed on a calculator running Windows vii Ultimate x64 Service Pack i.

Figure 1: .NET Framework version specific subfolders.

↑ Back to superlative

Registry Keys

The informations related to the .NET Framework installation (forth with the informations regarding the status of the installed Service Packs) are stored in the Windows registry under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP cardinal. Figure 2 depicts the registry keys for multiple .NET Framework version installed on a computer running Windows 7 Ultimate x64 Service Pack 1.

Figure ii: .Cyberspace Framework version specific registry keys.

Table 1 provides a list of the stored values according to each installed .NET Framework version.

.NET Framework Version Service Pack Level Registry Key Name Value
iv - Client Original Release HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Client Proper name: Install, Type: REG_DWORD, Data: one
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Client Name: Version, Blazon: REG_SZ, Data: 4.0.30319.0
4 - Full Original Release HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full Name: Install, Blazon: REG_DWORD, Information: ane
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Total Proper noun: Version, Type: REG_SZ, Information: 4.0.30319.0
iii.5 Original Release HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Framework Setup\NDP\v3.5 Proper name: Install, Type: REG_DWORD, Data: i
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5 Proper noun: SP, Blazon: REG_DWORD, Information: 0
3.5 Service Pack 1 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5 Name: Install, Blazon: REG_DWORD, Data: one
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.five Name: SP, Type: REG_DWORD, Data: 1
iii.0 Original Release Follow the deployment and detection guidance in the document "Microsoft .NET Framework three.0 Deployment Guide" on the MSDN Library
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0 Name: SP, Type: REG_DWORD, Data: 0
3.0 Service Pack 1 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0 Name: Install, Type: REG_DWORD, Data: one
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cyberspace Framework Setup\NDP\v3.0 Proper name: SP, Type: REG_DWORD, Information: 1
3.0 Service Pack 2 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Net Framework Setup\NDP\v3.0 Name: Install, Type: REG_DWORD, Data: one
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0 Name: SP, Type: REG_DWORD, Data: 2
2.0 Original Release HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727 Name: Install, Type: REG_DWORD, Data: ane
HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727 Name: SP, Blazon: REG_DWORD, Information: 0
2.0 Service Pack 1 HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Framework Setup\NDP\v2.0.50727 Proper noun: Install, Type: REG_DWORD, Data: one
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Framework Setup\NDP\v2.0.50727 Name: SP, Type: REG_DWORD, Information: 1
2.0 Service Pack two HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727 Proper name: Install, Blazon: REG_DWORD, Data: 1
HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727 Name: SP, Blazon: REG_DWORD, Data: ii
ane.1 (on 32-scrap operating systems) Original Release HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Net Framework Setup\NDP\v1.1.4322 Proper name: Install, Type: REG_DWORD, Data: 1
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322 Proper noun: SP, Blazon: REG_DWORD, Data: 0
1.1 (on 32-flake operating systems) Service Pack 1 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Framework Setup\NDP\v1.1.4322 Name: Install, Type: REG_DWORD, Information: 1
one.i (on 64-scrap operating systems) Original Release HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322 Name: Install, Type: REG_DWORD, Data: 1
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322 Proper noun: SP, Type: REG_DWORD, Information: 0
one.1 (on 64-fleck operating systems) Service Pack ane HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Net Framework Setup\NDP\v1.i.4322 Proper noun: Install, Type: REG_DWORD, Data: i
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Framework Setup\NDP\v1.ane.4322 Name: SP, Type: REG_DWORD, Data: ane
one.0 (on supported platforms except for Windows XP Media Center and Tablet PC) Original Release HKEY_LOCAL_MACHINE\Software\Microsoft\Agile Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd} Proper name: Version, Blazon: REG_SZ, Information: i.0.3705.0
1.0 (on supported platforms except for Windows XP Media Center and Tablet PC) Service Pack 1 HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd} Name: Version, Type: REG_SZ, Data: one.0.3705.one
one.0 (on supported platforms except for Windows XP Media Center and Tablet PC) Service Pack ii HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd} Name: Version, Type: REG_SZ, Data: 1.0.3705.two
1.0 (on supported platforms except for Windows XP Media Middle and Tablet PC) Service Pack three HKEY_LOCAL_MACHINE\Software\Microsoft\Agile Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd} Name: Version, Type: REG_SZ, Data: one.0.3705.3
1.0 (shipped with Windows XP Media Center 2002/2004 and Tablet PC 2004) Service Pack 2 HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{FDC11A6F-17D1-48f9-9EA3-9051954BAA24} Proper name: Version, Blazon: REG_SZ, Data: i.0.3705.2
1.0 (shipped with Windows XP Media Center 2005 and Tablet PC 2005) Service Pack 3 HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{FDC11A6F-17D1-48f9-9EA3-9051954BAA24} Name: Version, Type: REG_SZ, Information: ane.0.3705.three

Tabular array i: .NET Framework version specific registry keys values.

To find the being of a specific .Net Framework version regardless of the Service Pack level, or to discover a service pack level or a afterward service pack level of the same .Cyberspace Framework version, utilise the registry information that listed Table 2.

.NET Framework Version Service Pack Level Registry Key Proper name Value
4 - Client Whatsoever Version HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Framework Setup\NDP\v4\Client Install = i
4 - Full Any Version HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cyberspace Framework Setup\NDP\v4\Full Install = i
3.5 Whatsoever Version HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Framework Setup\NDP\v3.5 Install = 1
3.5 Service Pack one or Greater HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cyberspace Framework Setup\NDP\v3.5 SP >= 1
3.0 Any Version HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0 Install = 1
three.0 Service Pack 1 or Greater HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0 SP >= i
iii.0 Service Pack ii or Greater HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cyberspace Framework Setup\NDP\v3.0 SP >= 2
2.0 Whatever Version HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727 Install = ane
two.0 Service Pack ane or Greater HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Framework Setup\NDP\v2.0.50727 SP >= 1
2.0 Service Pack ii or Greater HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727 SP >= two
one.1 Whatsoever Version HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Framework Setup\NDP\v1.1.4322 Install = 1
one.one Service Pack 1 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.one.4322 SP >= ane
1.0 Any Version HKEY_LOCAL_MACHINE\Software\Microsoft\.Net Framework\Policy\v1.0 Name: 3705, Type: REG_SZ, exists
one.0 (on supported platforms except for Windows XP Media Center and Tablet PC) Service Pack 1 or Greater HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd} Version >= 1.0.3705.1
1.0 (on supported platforms except for Windows XP Media Middle and Tablet PC) Service Pack ii or Greater HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd} Version >= one.0.3705.2
1.0 (on supported platforms except for Windows XP Media Center and Tablet PC) Service Pack three or Greater HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd} Version >= 1.0.3705.iii
i.0 (shipped with Windows XP Media Middle 2002/2004 and Tablet PC 2004) Service Pack ii or Greater HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{FDC11A6F-17D1-48f9-9EA3-9051954BAA24} Version >= i.0.3705.2
1.0 (shipped with Windows XP Media Heart 2005 and Tablet PC 2005) Service Pack three or Greater HKEY_LOCAL_MACHINE\Software\Microsoft\Agile Setup\Installed Components\{FDC11A6F-17D1-48f9-9EA3-9051954BAA24} Version >= ane.0.3705.2

Table ii: .Cyberspace Framework version specific registry keys values regardless of the Service Pack level.

↑ Back to top

Determining the .NET Framework Version past Script

Y'all can use the PowerShell script to get the .Internet Framework info on your computer: How to determine versions & service pack levels of .Net Framework by PowerShell.

Determining the .Net Framework Version by Code

The .Cyberspace Framework version can exist adamant past writing code that queries the Common Language Runtime (CLR) version past using the Version property of theArrangement.Environment class, as in the post-obit C# code snippet

using System;  class Sample {     public static void Principal()     {       Panel.WriteLine();       Console.WriteLine("Version: {0}", Surroundings.Version.ToString());     } }        

If you compile this program with the .Cyberspace Framework 3.5, this holding's value volition be "2.0.50727.3603".

↑ Back to meridian

The CLRVER Tool

The CLR Version tool (Clrver.exe) reports all the installed versions of the Common Linguistic communication Runtime (CLR) on the figurer. This tool is automatically installed with Visual Studio and with the Windows SDK and it must exist executed from the Visual Studio Command Prompt or the Windows SDK Control Prompt.
At the command prompt type the following

clrver [selection]

where [selection] can exist -all to display all the managed processes and the version of the CLR they are using, -? to brandish command syntax and options for the tool or pid to display the version(s) of the CLR used past the process that has the specified procedure ID. Running the tool with no options displays all installed CLR versions.

↑ Dorsum to top


Other Languages

This article is also bachelor in the following languages:

Italian (it-Information technology)

  • Come up determinare le versioni di .NET Framework installate (it-IT)