project-system: Project with PackageId containing parameter does not import nested dependencies when referenced by another project.
Visual Studio Version: 16.8.6
Summary:
When a project references another project that has a PackageId that contains a parameter (e.g. <PackageId>MyPackage.$(SomeParameter)</PackageId>), any dependencies of the referenced project are not imported into the referencing project.
Steps to Reproduce:
- Create 2 projects, of which one has a
PackageIdcontaining a parameter and at least oneProject/PackageReference. - Reference this project in the other project.
Expected Behavior:
The project reference tree contains both the referenced project and the references of that project (see green arrow in image below)

Actual Behavior:
The project reference tree doesn’t contain any reference of the referenced project (see red arrow in image below)

User Impact: Due to this issue, we need to include a lot of additional package/project references required by the projects references whereas this usually is taken care of by the project system.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 15 (6 by maintainers)
Thanks @wouterroos, I think I know what this issue is, and that it’s related to the fact your projects are mutli-targeting. I am away from work for the rest of the week so will pick this up once I’m back.
@drewnoakes Thanks. I might be able to make some time later today to create a repro. Will post it here when done.