Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Fellows

How to check .net 6.x.x version installed or not by Registry ?
for both x86 and 64 bit OS.

What I have tried:

I found 2 registry values by google but their exists multiple on different PCs. So I want to handle all registry keys in my application.

HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\sharedhost\Version


HKLM\SOFTWARE\Microsoft\ASP.NET Core\Shared Framework\v6.0
Posted
Updated 24-Sep-22 20:35pm
v2
Comments
RickZeeland 24-Sep-22 5:15am    
It's a big mess I'm afraid, tried to follow the ongoing discussion here:
https://github.com/dotnet/runtime/issues/3393
But the relevant link at the end of the discussion seems to be gone :(

Quote:
The version of .NET Framework (4.5 and later) installed on a machine is listed in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full. If the Full subkey is missing, then .NET Framework 4.5 or above isn't installed.


Determine which .NET Framework versions are installed - .NET Framework | Microsoft Learn[^]
 
Share this answer
 
The registry location seems to change per update as a user commented here:
Correct approach to Check for .NET 6 installation - Microsoft Q&A[^]
Quote:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.NETCore.App]
"3.1.26"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.WindowsDesktop.App]
"5.0.17"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.WindowsDesktop.App]
"6.0.6"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\dotnet\Setup\InstalledVersions\x64\sharedhost]
"Version"="6.0.6"


Don't understand why these .NET Core guys do not follow any standards :(
 
Share this answer
 
Comments
DoingWork 26-Sep-22 7:20am    
What is meant by dword:000001 ??
I have installed and then un-installed v6.0.8, but still dowrd value is 00001. (means no change)
RickZeeland 26-Sep-22 8:14am    
Maybe your PC needs a reset? or another app is still using .NET 6 ?

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900