private static string GetDisplayRid(DotnetVersionFile versionFile) { FrameworkDependencyFile fxDepsFile = new FrameworkDependencyFile(); string currentRid = RuntimeEnvironment.GetRuntimeIdentifier(); // if the current RID isn't supported by the shared framework, display the RID the CLI was // built with instead, so the user knows which RID they should put in their "runtimes" section. return(fxDepsFile.IsRuntimeSupported(currentRid) ? currentRid : versionFile.BuildRid); }
public static string InferLegacyRestoreRuntimeIdentifier() { if (RuntimeEnvironment.OperatingSystemPlatform != Platform.Windows) { FrameworkDependencyFile fxDepsFile = new FrameworkDependencyFile(); return(fxDepsFile.SupportsCurrentRuntime() ? RuntimeEnvironment.GetRuntimeIdentifier() : DotnetFiles.VersionFileObject.BuildRid); } else { var arch = RuntimeEnvironment.RuntimeArchitecture.ToLowerInvariant(); return("win7-" + arch); } }