dotnet / dotnet/project-system

Project with PackageId containing parameter does not import nested dependencies when referenced by another project.

Open
#7,019 15 comments 0 reactions 1 assignee Claimed by @drewnoakes View on GitHub
Triage-Investigate
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

**Visual Studio Version**: 16.8.6

**Summary**:
When a project references another project that has a `PackageId` that contains a parameter (e.g. `MyPackage.$(SomeParameter)`), 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](https://user-images.githubusercontent.com/5137829/110772880-63544000-825c-11eb-8de6-0773854377e2.png)

**Actual Behavior**:
The project reference tree doesn't contain any reference of the referenced project (see red arrow in image below)
![image](https://user-images.githubusercontent.com/5137829/110772881-64856d00-825c-11eb-9e26-cb77a3b5ee36.png)

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.