Walker News

How To Verify .Net Framework Version

The .Net Framework is Microsoft promise of “compile once and run everywhere” programming approach. Conceptually, the .Net Framework is similar to Java “write once run everywhere (WORE)” language on JVM, where the interoperability programming feature being one of the vital functionality.

Since Microsoft introduces .Net Framework 1.0 as an optional upgrade on Nov 2000, the latest stable release of .Net Framework 3.0 (WinFX) has been the mandatory component of all Windows Vista and Windows Server 2008 (Longhorn) Operating systems!
Microsoft .Net Framework version since year 2000
  • .NET Framework 1.0 Beta 1 v1.0.????.0 on Nov 2000
  • .NET Framework 1.0 Beta 2 v1.0.2914.0 on Jun 2001
  • .NET Framework 1.0 RTM v1.0.3705.0 on Jan 2002
  • .NET Framework 1.0 SP1 v1.0.3705.209 on Mar 2002
  • .NET Framework 1.0 SP2 v1.0.3705.288 on Aug 2002
  • .NET Framework 1.0 SP3 v1.0.3705.6018 on Aug 2004
  • .NET Framework 1.1 RTM v1.1.4322.573 on Apr 2003
  • .NET Framework 1.1 SP1 v1.1.4322.2032 on Aug 2004
  • .NET Framework 1.1 SP1 v1.1.4322.2300 on Mar 2005 (Windows 2003)
  • .NET Framework 2.0 RTM v2.0.50727.42 on Nov 2005
  • .NET Framework 3.0 RTM v3.0.4506.30 on Nov 2006
  • .NET Framework 3.5 Beta 1 v3.5 on Apr 2007
  • .NET Framework 3.5 Beta 2 v3.5 on Jul 2007

How to identify, check, detect or verify the Microsoft .Net Framework version installed on a computer?

There are at least three ways to verify Microsoft .Net Framework version, i.e. by reading the Windows Registry keys, by Internet Explorer User Agent String or by compiling a .Net program to read the Environment.Version property of System namespace.

Reading a Registry Key

There are specific Windows Registry keys to detect the .NET Framework version installed on a computer:

.Net Framework 3.0 will set InstallSuccess to 1 in this Windows Registry path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup

.Net Framework 2.0 will set Install to 1 in this Windows Registry path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727

.Net Framework 1.1 will set Install to 1 in this Windows Registry path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322

.Net Framework 1.0 will set 3705 to 3321-3705 in this Windows Registry path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v1.0

Reading Internet Explorer User Agent String

Open up Internet Explorer, type the following JavaScript code in the Address bar and press ENTER:
javascript:alert(navigator.userAgent)

Look for the .Net CLR keyword which represents the installed .Net Framework version. The respective .Net Framework version reported by IE User Agent String can be located in these Windows Registry path:

.Net Framework 3.0 in IE User Agent String
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\Post Platform\.NET CLR.3.0.04131.06

.Net Framework 2.0 in IE User Agent String
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\Post Platform\.NET CLR 2.0.50727

.Net Framework 1.1 in IE User Agent String
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\Post Platform\.NET CLR 1.1.4322

Reading the Environment.Version property of System namespace.

If you’re keen on .Net programming, compile either one of these .Net program source code samples that retrieve Environment.Version property to identify .Net Framework version:

C# source code to identify .Net Framework version:

Save this C# source code as DotNetVer.cs and compile it with C# command line compiler, i.e. csc DotNetVer.cs
using System;

class Version 
{  
  public static void Main() 
  {
    Console.WriteLine();
    Console.WriteLine(".Net Framework Version {0}",
       Environment.Version.ToString());
  }
}

C++.Net source code to identify .Net Framework version:

Save this C++.Net source code as DotNetVer.cpp and compile it with C++.Net command line compiler, i.e. cl /clr DotNetVer.cpp
using namespace System;

int main() 
{
  Version^ objDotNetVer = Environment::Version;

  if (objDotNetVer)
  {
    int intBuild = objDotNetVer->Build;
    int intMajor = objDotNetVer->Major;
    int intMinor = objDotNetVer->Minor;
    int intRev   = objDotNetVer->Revision;

    Console::Write(".NET Framework version ");
    Console::WriteLine("{0}.{1}.{2}.{3}", 
       intMajor, intMinor, intBuild, intRev);
  }

  return 0;
}

P/S: With references to MSDN article on Environment.Version property.

Custom Search

  1. Walker 31-07-07@23:49

    If the .Net Framework SDK is installed, you can detect or confirm the version of both .Net Framework and .Net compilers installed on your computer.

    Open the CMD Shell or Command Shell that’s specifically tweaked for .Net command line compilers,

    Type csc (C# compiler), cl (C++.Net compiler) or vbc (VB.Net compiler) and press ENTER key,

    Sample output of csc:

    Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.312
    for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
    Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

  2. amol 16-04-08@16:13

    How to identify, check, detect or verify the Microsoft .Net Framework version installed on a server on which i will upload my site?

  3. How To Check .Net Framework Version Installed – Walker News 16-05-08@00:27

    [...] Microsoft .Net 3.5 framework is in RTM version since Nov 2007. While not every Windows machines require .Net framework to run, but sooner or later you may find some programs failed because of no such framework installed or otherwise the latest .Net 3.5 framework is not found. In this case, you might wonder what .Net framework version you have or do you have the so-called latest .Net 3.5 framework? OK, general end users can use either one of these ways to check the .Net framework version: [...]

2014  •  Privacy Policy