Avoid unnecessary deps in M.E.Logging.Abstractions (#59162)
authorViktor Hofer <viktor.hofer@microsoft.com>
Wed, 15 Sep 2021 17:26:08 +0000 (19:26 +0200)
committerGitHub <noreply@github.com>
Wed, 15 Sep 2021 17:26:08 +0000 (19:26 +0200)
Fixes https://github.com/dotnet/runtime/issues/59161

The System.Buffers and System.Memory packages are
dependencies of the net6.0 M.E.Logging.Abstractions
library even though these libraries are part of the
.NETCoreApp shared framework.

It's undesirable to have the dependencies in the graph
as these aren't built live anymore and are only serviced
on demand.

src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj

index da0b561..0d3728b 100644 (file)
@@ -30,7 +30,7 @@ Microsoft.Extensions.Logging.Abstractions.NullLogger</PackageDescription>
              Link="Common\System\Text\ValueStringBuilder.cs" />
   </ItemGroup>
 
-  <ItemGroup>
+  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
     <PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
     <PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
   </ItemGroup>