public void ValidateSdkLocation(FilePath location)
 {
     if (!location.IsNullOrEmpty)
     {
         DotNetCorePath  = new DotNetCorePath(location);
         SdkPaths        = GetSdkPaths(DotNetCorePath);
         RuntimeVersions = DotNetCoreRuntimeVersions.GetInstalledVersions(DotNetCorePath.FileName).ToArray();
     }
     else
     {
         DotNetCorePath  = null;
         SdkPaths        = new DotNetCoreSdkPaths();
         RuntimeVersions = Array.Empty <DotNetCoreVersion> ();
     }
 }
        static bool IsSupportedDotNetCoreRuntimeInstalled()
        {
            if (!DotNetCoreRuntime.IsInstalled)
            {
                return(false);
            }

            foreach (DotNetCoreVersion version in DotNetCoreRuntimeVersions.GetInstalledVersions(DotNetCoreRuntime.FileName))
            {
                if (RequiredDotNetCoreRuntimeVersion.Major == version.Major &&
                    RequiredDotNetCoreRuntimeVersion.Minor == version.Minor)
                {
                    return(true);
                }
            }

            return(false);
        }