File tree Expand file tree Collapse file tree 3 files changed +3
-324
lines changed Expand file tree Collapse file tree 3 files changed +3
-324
lines changed Original file line number Diff line number Diff line change 24
24
<PackageReference Include =" System.Threading.Tasks.Extensions" Version =" 4.5.4" />
25
25
<PackageReference Include =" Microsoft.CodeAnalysis.CSharp" Version =" 3.0.0" />
26
26
<PackageReference Include =" Microsoft.Diagnostics.Tracing.TraceEvent" Version =" 3.0.2" PrivateAssets =" contentfiles;analyzers" />
27
+ <PackageReference Include =" Microsoft.DotNet.PlatformAbstractions" Version =" 3.1.6" />
27
28
</ItemGroup >
28
29
<ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0' " >
29
- <PackageReference Include =" Microsoft.DotNet.PlatformAbstractions" Version =" 3.1.6" />
30
30
<PackageReference Include =" Microsoft.Win32.Registry" Version =" 5.0.0" />
31
31
</ItemGroup >
32
32
<ItemGroup Condition =" '$(OS)' == 'Windows_NT'" >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 14
14
using JetBrains . Annotations ;
15
15
using Microsoft . Win32 ;
16
16
using static System . Runtime . InteropServices . RuntimeInformation ;
17
- #if NETSTANDARD
18
17
using RuntimeEnvironment = Microsoft . DotNet . PlatformAbstractions . RuntimeEnvironment ;
19
- #endif
20
18
21
19
namespace BenchmarkDotNet . Portability
22
20
{
@@ -103,16 +101,8 @@ public static string GetOsVersion()
103
101
return OsBrandStringHelper . PrettifyMacOSX ( systemVersion , kernelVersion ) ;
104
102
}
105
103
106
- string operatingSystem ;
107
- string operatingSystemVersion ;
108
-
109
- #if NETSTANDARD
110
- operatingSystem = RuntimeEnvironment . OperatingSystem ;
111
- operatingSystemVersion = RuntimeEnvironment . OperatingSystemVersion ;
112
- #else
113
- operatingSystem = PlatformApis . GetOSName ( ) ;
114
- operatingSystemVersion = PlatformApis . GetOSVersion ( ) ;
115
- #endif
104
+ string operatingSystem = RuntimeEnvironment . OperatingSystem ;
105
+ string operatingSystemVersion = RuntimeEnvironment . OperatingSystemVersion ;
116
106
117
107
return OsBrandStringHelper . Prettify (
118
108
operatingSystem ,
You can’t perform that action at this time.
0 commit comments