I am getting in some projects version mismatches when using .NET 6/7 with .NET Standard 2.1 as class libraries:
warning NU1608: Detected package version outside of dependency constraint:
Rebus.Microsoft.Extensions.Logging 3.0.0 requires microsoft.extensions.logging (>= 6.0.0 && < 7.0.0)
but version Microsoft.Extensions.Logging 7.0.0 was resolved. [TargetFramework=net6.0]
warning NU1608: Detected package version outside of dependency constraint:
Rebus.Microsoft.Extensions.Logging 3.0.0 requires microsoft.extensions.logging (>= 6.0.0 && < 7.0.0)
but version Microsoft.Extensions.Logging 7.0.0 was resolved. [TargetFramework=net7.0]
Is there an incompatibility of netstandard with microsoft.extensions.logging that prevents us from just using the package without version constraints? if so, is there a workaround?
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="microsoft.extensions.logging" Version="[6,7)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="microsoft.extensions.logging" Version="[7,8)" />
</ItemGroup>