diff --git a/src/Microsoft.AspNet.Server.Kestrel/KestrelEngine.cs b/src/Microsoft.AspNet.Server.Kestrel/KestrelEngine.cs index dec15232f7..9a68cd9df3 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/KestrelEngine.cs +++ b/src/Microsoft.AspNet.Server.Kestrel/KestrelEngine.cs @@ -9,7 +9,7 @@ using Microsoft.AspNet.Http.Features; using Microsoft.AspNet.Server.Kestrel.Http; using Microsoft.AspNet.Server.Kestrel.Infrastructure; using Microsoft.AspNet.Server.Kestrel.Networking; -using Microsoft.Dnx.Runtime; +using Microsoft.Extensions.PlatformAbstractions; using Microsoft.Extensions.Logging; namespace Microsoft.AspNet.Server.Kestrel diff --git a/src/Microsoft.AspNet.Server.Kestrel/ServerFactory.cs b/src/Microsoft.AspNet.Server.Kestrel/ServerFactory.cs index f39bff2a27..e801749a87 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/ServerFactory.cs +++ b/src/Microsoft.AspNet.Server.Kestrel/ServerFactory.cs @@ -9,9 +9,9 @@ using Microsoft.AspNet.Hosting.Server; using Microsoft.AspNet.Http.Features; using Microsoft.AspNet.Server.Features; using Microsoft.AspNet.Server.Kestrel.Http; -using Microsoft.Dnx.Runtime; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.PlatformAbstractions; namespace Microsoft.AspNet.Server.Kestrel { diff --git a/src/Microsoft.AspNet.Server.Kestrel/project.json b/src/Microsoft.AspNet.Server.Kestrel/project.json index 24e5f01b8f..d9a6da0f42 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/project.json +++ b/src/Microsoft.AspNet.Server.Kestrel/project.json @@ -7,7 +7,7 @@ }, "dependencies": { "Microsoft.AspNet.Hosting": "1.0.0-*", - "Microsoft.Dnx.Runtime.Abstractions": "1.0.0-*", + "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", "Microsoft.Extensions.Logging.Abstractions": "1.0.0-*", "System.Numerics.Vectors": "4.1.1-beta-*", "Microsoft.StandardsPolice": { diff --git a/test/Microsoft.AspNet.Server.KestrelTests/EngineTests.cs b/test/Microsoft.AspNet.Server.KestrelTests/EngineTests.cs index 4bde4179f6..633c131c53 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/EngineTests.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/EngineTests.cs @@ -10,8 +10,7 @@ using System.Threading.Tasks; using Microsoft.AspNet.Http.Features; using Microsoft.AspNet.Server.Kestrel; using Microsoft.AspNet.Server.Kestrel.Filter; -using Microsoft.Dnx.Runtime; -using Microsoft.Dnx.Runtime.Infrastructure; +using Microsoft.Extensions.PlatformAbstractions; using Microsoft.Extensions.Logging; using Xunit; diff --git a/test/Microsoft.AspNet.Server.KestrelTests/MultipleLoopTests.cs b/test/Microsoft.AspNet.Server.KestrelTests/MultipleLoopTests.cs index ddbecbd06d..cb870ea144 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/MultipleLoopTests.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/MultipleLoopTests.cs @@ -6,8 +6,7 @@ using System.Threading; using Microsoft.AspNet.Server.Kestrel; using Microsoft.AspNet.Server.Kestrel.Infrastructure; using Microsoft.AspNet.Server.Kestrel.Networking; -using Microsoft.Dnx.Runtime; -using Microsoft.Dnx.Runtime.Infrastructure; +using Microsoft.Extensions.PlatformAbstractions; using Xunit; namespace Microsoft.AspNet.Server.KestrelTests diff --git a/test/Microsoft.AspNet.Server.KestrelTests/NetworkingTests.cs b/test/Microsoft.AspNet.Server.KestrelTests/NetworkingTests.cs index 363cb1ea4d..aea3274475 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/NetworkingTests.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/NetworkingTests.cs @@ -9,8 +9,7 @@ using System.Threading.Tasks; using Microsoft.AspNet.Server.Kestrel; using Microsoft.AspNet.Server.Kestrel.Infrastructure; using Microsoft.AspNet.Server.Kestrel.Networking; -using Microsoft.Dnx.Runtime; -using Microsoft.Dnx.Runtime.Infrastructure; +using Microsoft.Extensions.PlatformAbstractions; using Xunit; namespace Microsoft.AspNet.Server.KestrelTests diff --git a/test/Microsoft.AspNet.Server.KestrelTests/Program.cs b/test/Microsoft.AspNet.Server.KestrelTests/Program.cs index 858790c686..83dbb72393 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/Program.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/Program.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.Dnx.Runtime; +using Microsoft.Extensions.PlatformAbstractions; namespace Microsoft.AspNet.Server.KestrelTests { diff --git a/test/Microsoft.AspNet.Server.KestrelTests/TestServer.cs b/test/Microsoft.AspNet.Server.KestrelTests/TestServer.cs index d47238341d..698b7a1d57 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/TestServer.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/TestServer.cs @@ -5,8 +5,7 @@ using System; using System.Threading.Tasks; using Microsoft.AspNet.Server.Kestrel; using Microsoft.AspNet.Server.Kestrel.Http; -using Microsoft.Dnx.Runtime; -using Microsoft.Dnx.Runtime.Infrastructure; +using Microsoft.Extensions.PlatformAbstractions; using Microsoft.AspNet.Http.Features; namespace Microsoft.AspNet.Server.KestrelTests diff --git a/tools/Microsoft.AspNet.Server.Kestrel.LibuvCopier/Program.cs b/tools/Microsoft.AspNet.Server.Kestrel.LibuvCopier/Program.cs index 3904cfc2ed..0226bbde54 100644 --- a/tools/Microsoft.AspNet.Server.Kestrel.LibuvCopier/Program.cs +++ b/tools/Microsoft.AspNet.Server.Kestrel.LibuvCopier/Program.cs @@ -1,20 +1,13 @@ using System; using System.IO; using System.Linq; -using Microsoft.Dnx.Runtime; +using Microsoft.Extensions.PlatformAbstractions; using Newtonsoft.Json.Linq; namespace Microsoft.AspNet.Server.Kestrel.LibuvCopier { public class Program { - private readonly IRuntimeEnvironment _runtimeEnv; - - public Program(IRuntimeEnvironment runtimeEnv) - { - _runtimeEnv = runtimeEnv; - } - public void Main(string[] args) { try @@ -74,7 +67,8 @@ namespace Microsoft.AspNet.Server.Kestrel.LibuvCopier #if DNX451 return Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); #else - if (_runtimeEnv.OperatingSystem == "Windows") + var runtimeEnv = PlatformServices.Default.Runtime; + if (runtimeEnv.OperatingSystem == "Windows") { return Environment.GetEnvironmentVariable("USERPROFILE") ?? Environment.GetEnvironmentVariable("HOMEDRIVE") + Environment.GetEnvironmentVariable("HOMEPATH"); diff --git a/tools/Microsoft.AspNet.Server.Kestrel.LibuvCopier/project.json b/tools/Microsoft.AspNet.Server.Kestrel.LibuvCopier/project.json index 681bfd77ee..373002bafb 100644 --- a/tools/Microsoft.AspNet.Server.Kestrel.LibuvCopier/project.json +++ b/tools/Microsoft.AspNet.Server.Kestrel.LibuvCopier/project.json @@ -7,7 +7,7 @@ "licenseUrl": "", "dependencies": { - "Microsoft.Dnx.Runtime.Abstractions": "1.0.0-*", + "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", "Newtonsoft.Json": "7.0.1" },