Remove use of Microsoft.Extensions.PlatformAbstractions
This commit is contained in:
parent
3c9f8dd99b
commit
a2d4f6fed0
6 changed files with 7 additions and 18 deletions
|
@ -2,12 +2,9 @@
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using System.Runtime.Loader;
|
using System.Runtime.Loader;
|
||||||
using Microsoft.DotNet.Cli.Utils;
|
using Microsoft.DotNet.Cli.Utils;
|
||||||
using Microsoft.DotNet.Tools.Common;
|
using Microsoft.DotNet.Tools.Common;
|
||||||
using Microsoft.Extensions.PlatformAbstractions;
|
|
||||||
using NuGet.Frameworks;
|
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli
|
namespace Microsoft.DotNet.Cli
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Microsoft.DotNet.Cli.Utils;
|
using Microsoft.DotNet.Cli.Utils;
|
||||||
using Microsoft.Extensions.PlatformAbstractions;
|
using Microsoft.DotNet.InternalAbstractions;
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli
|
namespace Microsoft.DotNet.Cli
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ namespace Microsoft.DotNet.Cli
|
||||||
|
|
||||||
var version = Product.Version;
|
var version = Product.Version;
|
||||||
|
|
||||||
var rid = PlatformServices.Default.Runtime.GetRuntimeIdentifier();
|
var rid = RuntimeEnvironment.GetRuntimeIdentifier();
|
||||||
|
|
||||||
_multicoreJitProfilePath = Path.Combine(profileRoot, "optimizationdata", version, rid);
|
_multicoreJitProfilePath = Path.Combine(profileRoot, "optimizationdata", version, rid);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,13 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.DotNet.Cli.Utils;
|
using Microsoft.DotNet.Cli.Utils;
|
||||||
using Microsoft.DotNet.ProjectModel.Graph;
|
using Microsoft.DotNet.ProjectModel.Graph;
|
||||||
using Microsoft.DotNet.TestFramework;
|
using Microsoft.DotNet.TestFramework;
|
||||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||||
using Microsoft.Extensions.PlatformAbstractions;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
@ -137,7 +137,7 @@ namespace Microsoft.DotNet.ProjectModel.Server.Tests
|
||||||
string expectedUnresolvedDependency,
|
string expectedUnresolvedDependency,
|
||||||
string expectedUnresolvedType)
|
string expectedUnresolvedType)
|
||||||
{
|
{
|
||||||
if (PlatformServices.Default.Runtime.OperatingSystemPlatform == Platform.Linux)
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
{
|
{
|
||||||
Console.WriteLine("Test is skipped on Linux");
|
Console.WriteLine("Test is skipped on Linux");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
using Microsoft.DotNet.Cli.Utils;
|
using Microsoft.DotNet.Cli.Utils;
|
||||||
using Microsoft.DotNet.TestFramework;
|
using Microsoft.DotNet.TestFramework;
|
||||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||||
using Microsoft.Extensions.PlatformAbstractions;
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Xunit.Abstractions;
|
using Xunit.Abstractions;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
|
using Microsoft.DotNet.InternalAbstractions;
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Tests
|
namespace Microsoft.DotNet.Tests
|
||||||
{
|
{
|
||||||
|
@ -105,7 +105,7 @@ namespace Microsoft.DotNet.Tests
|
||||||
|
|
||||||
private static string GetOptimizationRootPath(string version)
|
private static string GetOptimizationRootPath(string version)
|
||||||
{
|
{
|
||||||
var rid = PlatformServices.Default.Runtime.GetRuntimeIdentifier();
|
var rid = RuntimeEnvironment.GetRuntimeIdentifier();
|
||||||
|
|
||||||
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||||
? $@"Microsoft\dotnet\optimizationdata\{version}\{rid}"
|
? $@"Microsoft\dotnet\optimizationdata\{version}\{rid}"
|
||||||
|
|
|
@ -1,15 +1,8 @@
|
||||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
// 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.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
|
||||||
using Microsoft.DotNet.Cli.Utils;
|
|
||||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
|
||||||
using Microsoft.Extensions.PlatformAbstractions;
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Xunit;
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||||
using Xunit.Abstractions;
|
|
||||||
using FluentAssertions;
|
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Tests
|
namespace Microsoft.DotNet.Tests
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
"target": "project",
|
"target": "project",
|
||||||
"type": "build"
|
"type": "build"
|
||||||
},
|
},
|
||||||
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-20581",
|
|
||||||
"xunit": "2.1.0",
|
"xunit": "2.1.0",
|
||||||
"dotnet-test-xunit": "1.0.0-rc2-192208-24"
|
"dotnet-test-xunit": "1.0.0-rc2-192208-24"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue