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:

  1. Create 2 projects, of which one has a PackageId containing a parameter and at least one Project/PackageReference.
  2. 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) image

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

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)

Most upvoted comments

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.