Skip to content

New dependency resolver fails to suppress dependency when referenced package and project share the same name with transitive pinning #14673

@jeffkl

Description

@jeffkl

NuGet Product Used

MSBuild.exe

Product Version

6.14

Worked before?

No response

Impact

None

Repro Steps & Context

A suppressed dependency via PrivateAssets=All isn't suppressed in the new dependency resolver if:

  1. Transitive pinning is enabled
  2. A package and project with the same name are in the graph
  3. The pinned package is only referenced by a project

A:

<ProjectReference Include="..\B\B.csproj" />

B:

<PackageReference Include="C" PrivateAssets="All" />

If Bis a package that references C and its transitively pinned, it needs to be elavated. But if B is a project, it can declare PrivateAssets and suppress a dependency.

Verbose Logs

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions