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:
- Transitive pinning is enabled
- A package and project with the same name are in the graph
- 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