Skip to content
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

When changing a package version, update rather than replace the tree node #8998

Closed
drewnoakes opened this issue May 1, 2023 · 2 comments · Fixed by NuGet/NuGet.Client#5146 or #9008
Assignees
Labels
Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references Resolution-Fixed The bug has been fixed, refer to the milestone to see in which release it was fixed. Tenet-Performance This issue affects the "Performance" tenet. Tenet-User Friendly This issue affects the "User Friendly" tenet; UI usability, accessibility or high-DPI related. Triage-Approved Reviewed and prioritized

Comments

@drewnoakes
Copy link
Member

The dependencies tree currently looks for the node to update based on its caption.

When we change a package MyPackage from version 1.0 to 2.0, the caption changes from MyPackage (1.0) to MyPackage (2.0).

The current code thinks these are different packages and therefore removes the old tree and attaches a new one. This has the effect of causing the package's node to collapse if it were expanded, which is annoying.

Note any change here will need a corresponding change on the NuGet.Client side, as that code doesn't currently update attached child nodes if the package's version changes.

@drewnoakes drewnoakes added Tenet-User Friendly This issue affects the "User Friendly" tenet; UI usability, accessibility or high-DPI related. Tenet-Performance This issue affects the "Performance" tenet. Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references labels May 1, 2023
@drewnoakes
Copy link
Member Author

We should be able to identify the node via its browse object, which would give us the actual dependency ID, to make this unambiguous.

@drewnoakes
Copy link
Member Author

Note any change here will need a corresponding change on the NuGet.Client side, as that code doesn't currently update attached child nodes if the package's version changes.

The NuGet portion of this fix is in NuGet/NuGet.Client#5146

@haileymck haileymck assigned haileymck and drewnoakes and unassigned haileymck May 4, 2023
@haileymck haileymck added the Triage-Approved Reviewed and prioritized label May 4, 2023
@ghost ghost added the Resolution-Fixed The bug has been fixed, refer to the milestone to see in which release it was fixed. label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references Resolution-Fixed The bug has been fixed, refer to the milestone to see in which release it was fixed. Tenet-Performance This issue affects the "Performance" tenet. Tenet-User Friendly This issue affects the "User Friendly" tenet; UI usability, accessibility or high-DPI related. Triage-Approved Reviewed and prioritized
Projects
None yet
2 participants