private Boolean TryGetTargetFramework(out DirectoryInfo runtimeDir) { runtimeDir = File.Directory; if (RuntimesHelper.TryParseTFM(File.Directory.Name, out RuntimeInfo runtime)) { PackageTargetFramework = runtime; } return(PackageTargetFramework != null && runtimeDir != null); }
internal static IDictionary <RuntimeInfo, DirectoryInfo> GetPackageVersionRuntimes(DirectoryInfo lib) { var packageVersions = new Dictionary <RuntimeInfo, DirectoryInfo>(); if (lib != null && lib.Exists) { foreach (var targetFramework in lib.EnumerateDirectories("*", SearchOption.TopDirectoryOnly)) { if (RuntimesHelper.TryParseTFM(targetFramework.Name, out RuntimeInfo runtime)) { packageVersions.Add(runtime, targetFramework); } } } return(packageVersions); }