Replace PlatformAbstractions with RuntimeInformation
This commit is contained in:
parent
99d9ed9c2f
commit
0025724433
|
|
@ -31,7 +31,6 @@
|
|||
"Microsoft.Extensions.FileProviders.Physical": "1.0.0-*",
|
||||
"Microsoft.Extensions.Logging.Abstractions": "1.0.0-*",
|
||||
"Microsoft.Extensions.Options": "1.0.0-*",
|
||||
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
|
||||
"System.Diagnostics.DiagnosticSource": "4.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using System.Diagnostics;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
|
@ -16,7 +17,6 @@ using Microsoft.AspNetCore.Hosting;
|
|||
using Microsoft.AspNetCore.TestHost;
|
||||
using Microsoft.AspNetCore.Testing;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
|
@ -38,9 +38,7 @@ namespace Microsoft.AspNetCore.Diagnostics
|
|||
"TestFiles/SourceFile.txt"
|
||||
};
|
||||
|
||||
var OSPlatform = PlatformServices.Default.Runtime.OperatingSystemPlatform;
|
||||
|
||||
if (!(OSPlatform == Platform.Linux || OSPlatform == Platform.Darwin))
|
||||
if (!(RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)))
|
||||
{
|
||||
data.Add(@"TestFiles\SourceFile.txt");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0-*",
|
||||
"dotnet-test-xunit": "1.0.0-*",
|
||||
"Microsoft.NETCore.Platforms": "1.0.1-*",
|
||||
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
|
||||
|
|
|
|||
Loading…
Reference in New Issue