Avoid S.R.I.RuntimeInformation package dependency (#85642)
authorViktor Hofer <viktor.hofer@microsoft.com>
Wed, 3 May 2023 06:11:29 +0000 (08:11 +0200)
committerGitHub <noreply@github.com>
Wed, 3 May 2023 06:11:29 +0000 (08:11 +0200)
commit32a16d039dca69cae153a8e6905f697b8035c39d
tree2271845b9fbcea90cfd1124df4fe8984683cc2dd
parent0b04dfd35d5ae4b9fa6bf745232c381fce2759bf
Avoid S.R.I.RuntimeInformation package dependency (#85642)

Contributes to https://github.com/dotnet/runtime/issues/85641

System.Runtime.InteropServices.RuntimeInformation/4.3.0 is being
referenced in a few .NET Framework builds. The reference to that package
is undesirable as it brings in the entire netstandard1.x dependency
graph.

Instead, use System.Environment.OSVersion which returns "Microsoft
Windows NT" on .NET Framework, Mono and .NETCoreApp runtimes.
eng/Versions.props
src/libraries/Microsoft.Extensions.DependencyModel/src/EnvironmentWrapper.cs
src/libraries/Microsoft.Extensions.DependencyModel/src/Microsoft.Extensions.DependencyModel.csproj
src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/DotNetReferenceAssembliesPathResolver.cs
src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/WindowsServiceHelpers.cs
src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/WindowsServiceLifetimeHostBuilderExtensions.cs
src/libraries/Microsoft.Extensions.Hosting/src/HostingHostBuilderExtensions.cs
src/libraries/Microsoft.Extensions.Hosting/src/Microsoft.Extensions.Hosting.csproj
src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProvider.cs
src/libraries/Microsoft.Extensions.Logging.Console/src/Microsoft.Extensions.Logging.Console.csproj