Hi kaanfaruk,
According to the official document, the version of RegistryView applicable to .NET Framework ranges from 4.0 to 4.8.
So you need to change your target framework.
Then you can follow this document to determine which .NET Framework versions are installed.
And you need to note that 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.
Each version of .NET Framework from 1.1 to 4.0 is listed as a subkey at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP.
So if the Full subkey is missing, then .NET Framework 4.5 or above isn't installed.
I made a test with the code in the link and it worked fine.
The result:
Best Regards,
Daniel Zhang
C# .Net Framework 2.0 Use RegistryView
kaan faruk
21
Reputation points
[Turkish / TR]
C# .Net Framework 2.0da .Net Framework Kontrolü Yapmam Gerek Bunun İçin Biraz Ayarlamalar Yaptım. Gördüğüm Kodlardan Birini Aldım Biraz Ayarladım Ama RegistryView Microsoft.Win32.Registry Nuget Paketinde Var Oda .Net 4.5 Üstü Gerektiriyor Ama Benim Projem 2.0 Başka Bir Yolu Varmı ? RegistryView.Registry32 Kullanıcam.
[English / EN]
Hi I Have C# .Net Framework 2.0 App And I Need Use RegistryView To Check İnstalled .Net Framework Versions But Microsoft.Win32.Registry Nuget Packet Not Support .Net Framework 2.0 Please Helpme
Accepted answer
-
Daniel Zhang-MSFT 9,626 Reputation points
2020-08-18T02:33:20.417+00:00