I'm using the WPF application. I want to check programmatically whether .Net SDK is installed or not. I'm getting the list of SDK using the below code. But the problem is registry may change in the future.
RegistryKey ndpKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x64\sdk");
var names = ndpKey.GetValueNames();
I also run the following code but it gives me a .NET runtime version.
var netCoreVersion = Environment.Version;
var runtimeVersion= RuntimeInformation.FrameworkDescription;
Is there any way programmatically I can find whether .Net SDK is installed or not.