Click here to Skip to main content
15,119,637 members
Articles / Programming Languages / C#
Posted 14 Aug 2018

Tagged as


70 bookmarked

.NET Framework Checker

Rate me:
Please Sign up or sign in to vote.
4.91/5 (33 votes)
29 Oct 2018CPOL2 min read
This tool lists all available .NET Frameworks and checks the needed/linked .NET components of installed apps by selecting a target directory.


Users can install and run multiple versions of the .NET Framework on their computers. When you develop or deploy your app, you might need to know which .NET Framework versions are installed on the target's computer. This article manages the rare (but possible) situation if there aren't any .NET Frameworks installed. For this purpose, it starts with a pure C++ application (Starter) that doesn't need any .NET components in order to check whether at least anyone .NET Framework is available. If yes, the main application starts and shows a GUI with located components. Now the user has a possibility, to select a directory to check all *.EXEs, *.DLLs and *.OCXs in it for fulfillment of .NET requirements.


To get an accurate list of the .NET Framework versions installed on a computer, we need to view the registry. This feature is accompanied by Microsoft's document here. To find the .NET Framework 1 - 4, we need to use the following subkey:


For Versions 4.5 and later, we are looking for the following subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full

.NET Framework 4.5 and later

Value of the Release DWORD Version
378389 .NET Framework 4.5
378675 .NET Framework 4.5.1 installed with Windows 8.1 or Windows Server 2012 R2
378758 .NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2
379893 .NET Framework 4.5.2
Windows 10: 393295
On all other OS versions: 393297
.NET Framework 4.6
Windows 10 November Update: 394254
On all other OS versions: 394271
.NET Framework 4.6.1
Windows Server 2016: 394802
On all other OS versions: 394806
.NET Framework 4.6.2
Windows 10 Creators Update: 460798
On all other OS versions: 460805
.NET Framework 4.7
Windows 10 Creators Update: 461308
On all other OS versions: 461310
.NET Framework 4.7.1
Windows 10 April 2018: 461808
On all other OS versions: 461814
.NET Framework 4.7.2

That is exactly what the tool does:

int GetNetfxSpLevel(string pszNetfxRegKeyName, string pszNetfxRegValueName)
        var oRet = Registry.GetValue(pszNetfxRegKeyName, pszNetfxRegValueName, "");
        if (oRet != null) 
           return (Int32)oRet;
      catch (Exception ex)
       return -1;

Using the Tool

After starting the CheckDotNet.exe, you will see the following message box if absolutely no .NET Framework is available on your system:

Nothing found

However, this should be a very rare situation.

Most commonly, it will be found that one or more components and the CheckDotNet.exe will start the GUI application written in C#:

Image 3

It lists the available vs. not installed components on the left.

On the right, you can scan the target directory to check whether all applications in it fulfill the .NET dependency.


There is now a CMD line mode, many thanks to LightTempler:

CMD Mode


  • Current version 1.0.0
  • Added the command-line Version Image 5
  • Updated to Version 2.0.0 by adding recognition of .NET 4.6.2, 4.7, 4.7.1, 4.7.2
  • Updated to Version 3.2.0


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Leo Chapiro
Software Developer
Germany Germany

I'm a software developer living in Germany with my family (wife & 2 sons).
My hobbies: sport, traveling, books (former reading, now hearing).
Welcome to my homepage:

Comments and Discussions

Questionthere is nobody who could update that, thanks Pin
Member 1474358716-Mar-20 3:05
MemberMember 1474358716-Mar-20 3:05 
QuestionOn running CheckDotNet.exe on vanilla windows machine Pin
Vijaykumar Vadnal16-Jul-19 2:12
MemberVijaykumar Vadnal16-Jul-19 2:12 
Question.NET Framework 4.8 Pin
Alphons van der Heijden13-May-19 23:11
professionalAlphons van der Heijden13-May-19 23:11 
Question.Net Core Pin
Member 244330629-Oct-18 6:47
MemberMember 244330629-Oct-18 6:47 
SuggestionSmall suggestions Pin
BugDigger29-Oct-18 2:43
MemberBugDigger29-Oct-18 2:43 
GeneralRe: Small suggestions Pin
Leo Chapiro29-Oct-18 3:37
professionalLeo Chapiro29-Oct-18 3:37 
QuestionRevision 4.6.2-4-7-2 Pin
Member 244330624-Oct-18 13:00
MemberMember 244330624-Oct-18 13:00 
Nice C++ and .Net code mix.

However, for the detection your code still does not "shows".Net 4.6.2 onwards, as in GetDotNet the
if (bNetfx462Installed)


onwards is empty/missing.

However, I'm not quite shure if the concept how you use it works that way for .Net 4.5 onwards:
It tells all is installed based on actual installed .Net, so if it is 4.7.2 Instaled, all lower, up to 4.5, are also installed?
Why not code it that way then, meaning get 4.5 Regkey version and then list all lower versions as installed?

But for really finding out which versions are installed I've not investigated how to.

Maybe one of those methos can reveal this (hard for me to test as I have a lot of Core/SDK's installed).




ManagementObjectSearcher("SELECT * FROM Win32_ReliabilityRecords")

AnswerRe: Revision 4.6.2-4-7-2 Pin
Leo Chapiro29-Oct-18 2:32
professionalLeo Chapiro29-Oct-18 2:32 
SuggestionColor highlighting of installed/not installed Pin
DanielKenner15-Oct-18 3:42
MemberDanielKenner15-Oct-18 3:42 
GeneralRe: Color highlighting of installed/not installed Pin
Leo Chapiro23-Oct-18 5:05
professionalLeo Chapiro23-Oct-18 5:05 
BugTypo in Dialog and GroupBox Titles Pin
DanielKenner15-Oct-18 3:35
MemberDanielKenner15-Oct-18 3:35 
GeneralRe: Typo in Dialog and GroupBox Titles Pin
Leo Chapiro23-Oct-18 5:06
professionalLeo Chapiro23-Oct-18 5:06 
QuestionMissing CLI Sample :) Pin
phenixcorp23-Aug-18 12:33
professionalphenixcorp23-Aug-18 12:33 
QuestionTypo Pin
Phil Parkin16-Aug-18 7:21
MemberPhil Parkin16-Aug-18 7:21 
AnswerRe: Typo Pin
Leo Chapiro17-Aug-18 2:36
professionalLeo Chapiro17-Aug-18 2:36 
SuggestionA nice version checker (without code) Pin
Member 1395130016-Aug-18 2:32
MemberMember 1395130016-Aug-18 2:32 
GeneralRe: A nice version checker (without code) Pin
Leo Chapiro16-Aug-18 3:15
professionalLeo Chapiro16-Aug-18 3:15 
GeneralRe: A nice version checker (without code) Pin
Member 1395130016-Aug-18 4:55
MemberMember 1395130016-Aug-18 4:55 
QuestionRequesting More Pin
Member 1394886415-Aug-18 22:35
MemberMember 1394886415-Aug-18 22:35 
QuestionNice, but... Pin
huipri15-Aug-18 11:20
Memberhuipri15-Aug-18 11:20 
AnswerRe: Nice, but... Pin
Leo Chapiro16-Aug-18 1:20
professionalLeo Chapiro16-Aug-18 1:20 
GeneralRe: Nice, but... Pin
Youregi16-Aug-18 23:26
MemberYouregi16-Aug-18 23:26 
GeneralRe: Nice, but... Pin
huipri17-Aug-18 3:02
Memberhuipri17-Aug-18 3:02 
GeneralRe: Nice, but... Pin
konytskyy20-Aug-18 1:34
Memberkonytskyy20-Aug-18 1:34 
QuestionUsefull interactive, ... Pin
LightTempler14-Aug-18 10:48
MemberLightTempler14-Aug-18 10:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.