From d692066b2bd711653150ad2cccc2268583355532 Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Fri, 27 May 2016 11:46:54 -0700 Subject: [PATCH] Replace PlatformAbstractions with RuntimeInformation --- .../StaticFilesTestServer.cs | 4 ++-- test/Microsoft.AspNetCore.StaticFiles.Tests/project.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFilesTestServer.cs b/test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFilesTestServer.cs index 0070b191c5..0f63031210 100644 --- a/test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFilesTestServer.cs +++ b/test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFilesTestServer.cs @@ -3,12 +3,12 @@ using System; using System.Collections.Generic; +using System.Runtime.InteropServices; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.PlatformAbstractions; namespace Microsoft.AspNetCore.StaticFiles { @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.StaticFiles { public static TestServer Create(Action configureApp, Action configureServices = null) { - var contentRootNet451 = PlatformServices.Default.Runtime.OperatingSystemPlatform == Platform.Windows ? + var contentRootNet451 = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "." : "../../../../test/Microsoft.AspNetCore.StaticFiles.Tests"; Action defaultConfigureServices = services => { }; var configuration = new ConfigurationBuilder() diff --git a/test/Microsoft.AspNetCore.StaticFiles.Tests/project.json b/test/Microsoft.AspNetCore.StaticFiles.Tests/project.json index 57e5ecc738..0ca2b3dd39 100644 --- a/test/Microsoft.AspNetCore.StaticFiles.Tests/project.json +++ b/test/Microsoft.AspNetCore.StaticFiles.Tests/project.json @@ -16,6 +16,7 @@ ] }, "dependencies": { + "System.Runtime.InteropServices.RuntimeInformation": "4.0.0-*", "dotnet-test-xunit": "1.0.0-*", "Microsoft.NETCore.Platforms": "1.0.1-*", "Microsoft.AspNetCore.StaticFiles": "1.0.0-*",