petabridge/NBench

.Net Core: NU1605 Detected package downgrade: System.Reflection.TypeExtensions

bcbeatty opened this issue · 4 comments

When I try Install-Package NBench I'm getting the following error:

Severity Code Description Project File Line Suppression State Error NU1605 Detected package downgrade: System.Reflection.TypeExtensions from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version. Remark.Performance.NBench.Tests -> NBench 1.2.0 -> NETStandard.Library 1.6.1 -> System.Linq.Expressions 4.3.0 -> System.Reflection.TypeExtensions (>= 4.3.0) Performance.NBench.Tests -> NBench 1.2.0 -> System.Reflection.TypeExtensions (>= 4.1.0) Performance.NBench.Tests D:\\Performance.NBench.Tests.csproj 1

this does not happen I target Net462

We probably just need to upgrade those dependencies in the NBench library itself.

Man, @bcbeatty you are right - this is really quite annoying!

This can temporarily be solved by incorporating the following configuration into any of your affected projects:

<NoWarn>$(NoWarn);CS1591;NU1605</NoWarn>

That NU1605 warning is standard inside most of our projects, which is why I didn't notice this before.

Full example here:

NBench/src/common.props

Lines 2 to 18 in 95d3036

<PropertyGroup>
<Copyright>Copyright © 2015-2018 Petabridge</Copyright>
<Authors>Petabridge</Authors>
<VersionPrefix>1.2.1</VersionPrefix>
<PackageReleaseNotes>Fixed an issue with the `dotnet-nbench` package where it missed a required runtime in order to execute against .NET Core 2.* projects.</PackageReleaseNotes>
<PackageProjectUrl>
https://github.com/petabridge/NBench
</PackageProjectUrl>
<PackageLicenseUrl>
https://github.com/petabridge/NBench/blob/dev/LICENSE
</PackageLicenseUrl>
<PackageTags>performance;benchmarking;benchmark;perf;testing;NBench</PackageTags>
<NoWarn>$(NoWarn);CS1591;NU1605</NoWarn>
<PackageIconUrl>https://github.com/petabridge/NBench/raw/dev/images/NBench_logo_square_140.png</PackageIconUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/petabridge/NBench</RepositoryUrl>
</PropertyGroup>