New dependency resolver erroneously reports NU1605 (downgrade) when using transitive pinning a direct dependency and a downgrade exists in a package graph #13938
Labels
Area:NewDependencyResolver
Issues related to the new dependency graph resolver
Priority:2
Issues for the current backlog.
RegressionFromPreviousRTM
A regression from the last RTM. Example: worked in 6.2, doesn't work in 6.3
Type:Bug
NuGet Product Used
dotnet.exe, MSBuild.exe, NuGet.exe
Product Version
6.12
Worked before?
Yes
Impact
It's more difficult to complete my work
Repro Steps & Context
If you have a package with a downgrade in its graph, you have a direct package reference, and you have transitive pinning enabled, the new dependency resolution algorithm does not properly treat it as "pinned" and instead logs a downgrade warning. The legacy dependency resolution algorithm treats pinned dependencies as special, even if they are direct dependencies and will use higher versions, working around the downgrade. This results in erroneous NU1605 warnings being logged when they weren't before.
Verbose Logs
Workaround
Users can workaround the issue by setting an MSBuild property in their
Directory.Build.props
or an environment variable:The text was updated successfully, but these errors were encountered: