// Expected runtime name format: dnx-{FLAVOR}-{OS}-{ARCHITECTURE}.{VERSION} // Sample input: dnx-coreclr-win-x86.1.0.0.0 // Sample output: 1.0.0.0 private static string GetRuntimeVersion(PublishRuntime runtime) { if (runtime == null) { return(string.Empty); } var segments = runtime.Name.Split(new[] { '.' }, 2); return(segments[1]); }
// Expected runtime name format: dnx-{FLAVOR}-{OS}-{ARCHITECTURE}.{VERSION} // Sample input: dnx-coreclr-win-x86.1.0.0.0 // Sample output: coreclr private static string GetRuntimeFlavor(PublishRuntime runtime) { if (runtime == null) { return(string.Empty); } var segments = runtime.Name.Split(new[] { '.' }, 2); segments = segments[0].Split(new[] { '-' }, 4); return(segments[1]); }
public FrameworkName SelectFrameworkForRuntime(PublishRuntime runtime) { return(runtime.SelectBestFramework( GetCurrentProject().GetTargetFrameworks().Select(f => f.FrameworkName))); }
public FrameworkName SelectFrameworkForRuntime(PublishRuntime runtime) { return runtime.SelectBestFramework( GetCurrentProject().GetTargetFrameworks().Select(f => f.FrameworkName)); }
// Expected runtime name format: dnx-{FLAVOR}-{OS}-{ARCHITECTURE}.{VERSION} // Sample input: dnx-coreclr-win-x86.1.0.0.0 // Sample output: 1.0.0.0 private static string GetRuntimeVersion(PublishRuntime runtime) { if (runtime == null) { return string.Empty; } var segments = runtime.Name.Split(new[] { '.' }, 2); return segments[1]; }
// Expected runtime name format: dnx-{FLAVOR}-{OS}-{ARCHITECTURE}.{VERSION} // Sample input: dnx-coreclr-win-x86.1.0.0.0 // Sample output: coreclr private static string GetRuntimeFlavor(PublishRuntime runtime) { if (runtime == null) { return string.Empty; } var segments = runtime.Name.Split(new[] { '.' }, 2); segments = segments[0].Split(new[] { '-' }, 4); return segments[1]; }