From c3a720d4b31f4431ad9b3c8771ce5b1e9df4abb3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 23 Apr 2020 16:32:59 +0000 Subject: [PATCH 1/3] Update dependencies from https://github.com/dotnet/sdk build 20200423.3 - Microsoft.DotNet.MSBuildSdkResolver: 5.0.100-preview.4.20217.1 -> 5.0.100-preview.4.20223.3 - Microsoft.NET.Sdk: 5.0.100-preview.4.20217.1 -> 5.0.100-preview.4.20223.3 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index fbeca4468f5a..d8e26fea9598 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -79,13 +79,13 @@ https://github.com/dotnet/templating 1b50638acb1defc7d7ccaba5b2a0f4b0c50c0b3d - + https://github.com/dotnet/sdk - af10fe4cb05c7b90e2d0b0293dba769b54f396ad + 2e8d0ea179117d44f1bb9538b49a22e2ea46d37a - + https://github.com/dotnet/sdk - af10fe4cb05c7b90e2d0b0293dba769b54f396ad + 2e8d0ea179117d44f1bb9538b49a22e2ea46d37a diff --git a/eng/Versions.props b/eng/Versions.props index 116545617e52..b1310f658e98 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -49,8 +49,8 @@ - 5.0.100-preview.4.20217.1 - 5.0.100-preview.4.20217.1 + 5.0.100-preview.4.20223.3 + 5.0.100-preview.4.20223.3 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) From 4bbfd63c76af69b7f661364a75454641807f0df8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 23 Apr 2020 18:14:03 +0000 Subject: [PATCH 2/3] Update dependencies from https://github.com/dotnet/sdk build 20200423.5 - Microsoft.DotNet.MSBuildSdkResolver: 5.0.100-preview.4.20217.1 -> 5.0.100-preview.4.20223.5 - Microsoft.NET.Sdk: 5.0.100-preview.4.20217.1 -> 5.0.100-preview.4.20223.5 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d8e26fea9598..127470da05ee 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -79,13 +79,13 @@ https://github.com/dotnet/templating 1b50638acb1defc7d7ccaba5b2a0f4b0c50c0b3d - + https://github.com/dotnet/sdk - 2e8d0ea179117d44f1bb9538b49a22e2ea46d37a + 6fa49e835e87a89231e9193ec51fc7acbbb939af - + https://github.com/dotnet/sdk - 2e8d0ea179117d44f1bb9538b49a22e2ea46d37a + 6fa49e835e87a89231e9193ec51fc7acbbb939af diff --git a/eng/Versions.props b/eng/Versions.props index b1310f658e98..11a2562422d0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -49,8 +49,8 @@ - 5.0.100-preview.4.20223.3 - 5.0.100-preview.4.20223.3 + 5.0.100-preview.4.20223.5 + 5.0.100-preview.4.20223.5 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) From 44a42ac1292f1fc7dc86daf28e9f844c760770af Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 20 Apr 2020 12:53:19 -0700 Subject: [PATCH 3/3] Switch to using RuntimeInformation APIs instead of deprecated PlatformAbstractions See https://github.com/dotnet/sdk/pull/11076 --- global.json | 2 +- test/EndToEnd/GivenSelfContainedAppsRollForward.cs | 3 ++- test/EndToEnd/ProjectBuildTests.cs | 3 ++- .../UnixOnlyFactAttribute.cs | 5 +++-- .../UnixOnlyTheoryAttribute.cs | 4 ++-- .../WindowsOnlyFactAttribute.cs | 4 ++-- .../WindowsOnlyTheoryAttribute.cs | 4 ++-- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/global.json b/global.json index c15eb04d9531..db00fc486c8c 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "5.0.100-preview.1.20154.9", + "dotnet": "5.0.100-preview.4.20217.10", "runtimes": { "dotnet": [ "$(MicrosoftNETCoreAppRuntimePackageVersion)" diff --git a/test/EndToEnd/GivenSelfContainedAppsRollForward.cs b/test/EndToEnd/GivenSelfContainedAppsRollForward.cs index f90f0b410502..297dfd1d56bf 100644 --- a/test/EndToEnd/GivenSelfContainedAppsRollForward.cs +++ b/test/EndToEnd/GivenSelfContainedAppsRollForward.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Linq; +using System.Runtime.InteropServices; using System.Xml.Linq; using FluentAssertions; using Microsoft.DotNet.TestFramework; @@ -20,7 +21,7 @@ internal void ItRollsForwardToTheLatestVersion(string packageName, string minorV PackageName = packageName, MinorVersion = minorVersion, // Set RuntimeIdentifier to opt in to roll-forward behavior - RuntimeIdentifier = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier() + RuntimeIdentifier = RuntimeInformation.RuntimeIdentifier }; var testInstance = testProjectCreator.Create(); diff --git a/test/EndToEnd/ProjectBuildTests.cs b/test/EndToEnd/ProjectBuildTests.cs index 8a88bbc085e8..b17b90b73289 100644 --- a/test/EndToEnd/ProjectBuildTests.cs +++ b/test/EndToEnd/ProjectBuildTests.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Linq; +using System.Runtime.InteropServices; using System.Xml.Linq; using Microsoft.DotNet.PlatformAbstractions; using Microsoft.DotNet.TestFramework; @@ -127,7 +128,7 @@ private void TestTemplateBuild(string templateName, bool selfContained = false) .Execute(newArgs) .Should().Pass(); - var buildArgs = selfContained ? "" :$"-r {RuntimeEnvironment.GetRuntimeIdentifier()}"; + var buildArgs = selfContained ? "" :$"-r {RuntimeInformation.RuntimeIdentifier}"; var dotnetRoot = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest); new BuildCommand() .WithEnvironmentVariable("PATH", dotnetRoot) // override PATH since razor rely on PATH to find dotnet diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/UnixOnlyFactAttribute.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/UnixOnlyFactAttribute.cs index 78be9c8569f1..843d0668d87f 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/UnixOnlyFactAttribute.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/UnixOnlyFactAttribute.cs @@ -1,7 +1,8 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Microsoft.DotNet.PlatformAbstractions; + +using System.Runtime.InteropServices; using Xunit; namespace Microsoft.DotNet.Tools.Test.Utilities @@ -10,7 +11,7 @@ public class UnixOnlyFactAttribute : FactAttribute { public UnixOnlyFactAttribute() { - if (RuntimeEnvironment.OperatingSystemPlatform == Platform.Windows) + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { this.Skip = "This test requires Unix to run"; } diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/UnixOnlyTheoryAttribute.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/UnixOnlyTheoryAttribute.cs index fe0557b88c8b..461ea7b36b6a 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/UnixOnlyTheoryAttribute.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/UnixOnlyTheoryAttribute.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Microsoft.DotNet.PlatformAbstractions; +using System.Runtime.InteropServices; using Xunit; namespace Microsoft.DotNet.Tools.Test.Utilities @@ -10,7 +10,7 @@ public class UnixOnlyTheoryAttribute : TheoryAttribute { public UnixOnlyTheoryAttribute() { - if (RuntimeEnvironment.OperatingSystemPlatform == Platform.Windows) + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { this.Skip = "This test requires Unix to run"; } diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyFactAttribute.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyFactAttribute.cs index 7f9abcccba91..079a1af90dd3 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyFactAttribute.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyFactAttribute.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Microsoft.DotNet.PlatformAbstractions; +using System.Runtime.InteropServices; using Xunit; namespace Microsoft.DotNet.Tools.Test.Utilities @@ -10,7 +10,7 @@ public class WindowsOnlyFactAttribute : FactAttribute { public WindowsOnlyFactAttribute() { - if (RuntimeEnvironment.OperatingSystemPlatform != Platform.Windows) + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { this.Skip = "This test requires Windows to run"; } diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyTheoryAttribute.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyTheoryAttribute.cs index 8a663433f77c..98a0267b06d7 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyTheoryAttribute.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyTheoryAttribute.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Microsoft.DotNet.PlatformAbstractions; +using System.Runtime.InteropServices; using Xunit; namespace Microsoft.DotNet.Tools.Test.Utilities @@ -10,7 +10,7 @@ public class WindowsOnlyTheoryAttribute : TheoryAttribute { public WindowsOnlyTheoryAttribute() { - if (RuntimeEnvironment.OperatingSystemPlatform != Platform.Windows) + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { this.Skip = "This test requires Windows to run"; }