diff --git a/AspNetCoreSdkTests/RuntimeIdentifier.cs b/AspNetCoreSdkTests/RuntimeIdentifier.cs index 9a8124e6a9..ced811a32b 100644 --- a/AspNetCoreSdkTests/RuntimeIdentifier.cs +++ b/AspNetCoreSdkTests/RuntimeIdentifier.cs @@ -1,16 +1,33 @@ -namespace AspNetCoreSdkTests +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; + +namespace AspNetCoreSdkTests { // https://docs.microsoft.com/en-us/dotnet/core/rid-catalog public class RuntimeIdentifier { - public static RuntimeIdentifier None = new RuntimeIdentifier() { Name = "none" }; - public static RuntimeIdentifier Win_x64 = new RuntimeIdentifier() { Name = "win-x64" }; + public static RuntimeIdentifier None = new RuntimeIdentifier() { + Name = "none", + OSPlatforms = new[] { OSPlatform.Linux, OSPlatform.OSX, OSPlatform.Windows, }, + }; + + public static RuntimeIdentifier Win_x64 = new RuntimeIdentifier() { + Name = "win-x64", + OSPlatforms = new[] { OSPlatform.Windows, }, + }; + + public static RuntimeIdentifier Linux_x64 = new RuntimeIdentifier() { + Name = "linux-x64", + OSPlatforms = new[] { OSPlatform.Linux, }, + }; private RuntimeIdentifier() { } public string Name { get; private set; } public string RuntimeArgument => (this == None) ? string.Empty : $"--runtime {Name}"; public string Path => (this == None) ? string.Empty : Name; + public IEnumerable OSPlatforms { get; private set; } public override string ToString() => Name; } diff --git a/AspNetCoreSdkTests/TemplateTests.cs b/AspNetCoreSdkTests/TemplateTests.cs index e5ad196d33..ece9ec3561 100644 --- a/AspNetCoreSdkTests/TemplateTests.cs +++ b/AspNetCoreSdkTests/TemplateTests.cs @@ -3,6 +3,7 @@ using NUnit.Framework; using System.Collections.Generic; using System.Linq; using System.Net; +using System.Runtime.InteropServices; namespace AspNetCoreSdkTests { @@ -47,7 +48,7 @@ namespace AspNetCoreSdkTests Assert.AreEqual(HttpStatusCode.OK, template.HttpsResponseAfterExec.StatusCode); } - public static IEnumerable