How to find the .NET Core Desktop Runtime is installed in a windows machine

Viewed 1996

Is there any registry key to determine whether a windows machine has the .NET Core Desktop Runtime installed programmatically (e.x through c#)? I can see the registry is getting the following key when I install the .net core runtime \HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.NETCore.App<version>

This key is not specific to .NET Core Desktop Runtime what I want to know explicitly the .NET Core Desktop Runtime. I am modifying an existing installation setup for a WPF application and there I need to check the availability of .NET Core Desktop Runtime and if not installed then have to go and install. The tool that I am usinig to create the installation setup has the facility to check a particular registry key and also can download and run any exe (may be the .net desktop runtime). Please help

2 Answers

try this paths to find versions:

'SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.**WindowsDesktop**.App';

'SOFTWARE\dotnet\Setup\InstalledVersions\x86\sharedfx\Microsoft.**WindowsDesktop**.App';

If you go to the control panel, you can see the available .Net Runtime download.

ControlPanel

Related