-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependencies node should respect DisableTransitiveProjectReferences #5972
Comments
This is by design per the original design. This wasn't about showing things that the project inherits, just the dependencies that that upstream projects have. As we spoke the other day, we should change this design not just for projects but also packages and stop showing other dependencies. |
This was triggered in part by that conversation. My thinking was that parsing the assets file (being worked on in #3435) should address this problem. However looking further into this it seems that |
That seems like a bug if had no effect, these transitive dependencies are stored in the assets file and that's how we add them to build. |
Ah, you are right - this is implemented by the Assets resolver: https://github.com/dotnet/sdk/blob/f98197d56b051f8c5078e9017de1ef7046125205/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets#L249 and not passed to NuGet. |
@drewnoakes Is there a reason we need to do this (or might end up fixing it through other work) in 16.6? |
@tmeschter my hope is that this gets fixed as part of other work I'm doing. Specifically, a project reference's transitive dependencies will come from the assets file, not from the advertised references of the other project. If that's not the case, I'll move this back to triage with a suggestion for a different milestone. |
The value of |
@drewnoakes I'm not sure I understand - what are you proposing the SDK changes to fix the display issue? |
The tree shows what's in the assets file. My understanding is that the assets file should not contain the transitively-referenced-project due to |
I would like to use By using |
When a project sets property
DisableTransitiveProjectReferences
totrue
, the dependencies node should not display transitive project references.Current
App.csproj
ClassLibrary1.csproj
App's Dependencies Tree
Expected
ClassLibrary2
does not appear as a child dependency ofClassLibrary1
in theApp
project.The text was updated successfully, but these errors were encountered: