dotnet / dotnet/project-system

Cannot see project reference subtree in solution explorer if the packageId configured in csproj is not the same as the dll/project name

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

Description

_This issue has a corresponding [ticket on Developer Community](https://developercommunity.visualstudio.com/t/Cannot-see-project-reference-subtree-in-/1493531). Please vote and comment there to make sure your voice is heard._

---
[severity:It's more difficult to complete my work]
I use the Visual Studio 2019 Pro version 16.10.4

For exemple If I create 4 library projects named "ClassLibraryA", "ClassLibraryB", "ClassLibraryC" and "ClassLibraryD".
And I configure project references like this : ClassLibraryA -> ClassLibraryB -> ClassLibraryC -> ClassLibraryD
I can navigate in the solution explorer dependencies tree view like this :

![B0747c65c32c24409b4560c394e161182637635775239161530_standard-subtree-references](https://user-images.githubusercontent.com/350947/128578669-612ce1ad-751a-4c22-839e-e853d361b51a.png)

But when I define in "ClassLibraryB" csproj file a custom packageId and I unload and reload the "ClassLibraryA" project I cannot see the subprojects "ClassLibraryC" and "ClassLibraryD"

![Ba2baa0a631854e978679f364c399f702637635776058683008_subtree-references-with-custom-package-id](https://user-images.githubusercontent.com/350947/128578684-af87f78e-5bb1-4e14-b7e1-00e30a3cb058.png)

Note : if I configure the packageId of "ClassLibraryB" with the same name as the project or dll name (I do not know how it works), I can browse the subtree again

![Bb87a9ca1616d41c1bf3e4d97c24721bf637635782031554308_subtree-references-with-same-package-id-as-project-or-dll-name](https://user-images.githubusercontent.com/350947/128578703-361d75b9-f511-47f1-aecc-d5164d247be7.png)

I have investigate and it seems that it work if the AssemblyName and the PackageId names are the same in the “ClassLibraryB” so it seems to not be linked to the project name.

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.