Nlr
Nlr

Reputation: 213

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

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

Upvotes: 8

Views: 11550

Answers (3)

R.P
R.P

Reputation: 195

You can use power shell commands:

dotnet --list-runtimes 
dotnet --list-sdks
dotnet --info

Upvotes: 1

NizMaS
NizMaS

Reputation: 65

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';

Upvotes: 3

LinkedListT
LinkedListT

Reputation: 691

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

ControlPanel

Upvotes: 2

Related Questions