Packages which suppress NETStandard.Library reference cause downgrades when installed in netcoreapp1.0
#25657
Labels
Milestone
netcoreapp1.0
#25657
This is true for both the 2.1 packages we're building now as well as the 2.0 packages we shipped prior.
This manifests as
NU1605
errors.As an example, install System.Buffers 4.4.0 in a
netcoreapp1.0
project.For example:
The downgrade isn't caused by the common ancestor (
NETStandard.Library
) as the warning might lead you to believe. Instead it's occurring because of the following dependency:System.Buffers 4.4.0 -> System.Diagnostics.Debug 4.3.0 -> Microsoft.NETCore.Platforms 1.1.0 (runtime.json).
They are hitting this NuGet issue: NuGet/Home#3541.
The set of packages impacted in the 2.1 release are the following:
They are only impacted on
.NETCoreApp1.0
.If we wanted to fix this we could re-baseline to the 1.0 era packages: potentially breaking where folks counted on us bringing in the 1.1 version of packages in other TFMs. Special case the dependencies only on NETCoreApp1.0 could limit this, but is still potentially breaking if folks even on NETCoreApp1.0 depended on a fix or API added in a 1.1 version of a package.
In the realm of workarounds, folks can suppress the warning on NETCoreApp1.0 with
<NoWarn>$(NoWarn);NU1605</NoWarn>
, however this can result in real downgrades sneaking through. Alternatively you can lift up all ofNETStandard.Library
with<PackageReference Include="NETStandard.Library" Version="1.6.1" />
, this bypasses the NuGet bug by lifting up every package to the 1.1 version which may be undesirable since you end up running on a mixed state./cc @joperezr @weshaggard
The text was updated successfully, but these errors were encountered: