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

Dependency node fails to initialise when project does not define TargetFramework #6974

Closed
drewnoakes opened this issue Feb 19, 2021 · 1 comment · Fixed by #6975
Closed
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.
Milestone

Comments

@drewnoakes
Copy link
Member

As part of making the Dependencies node work for WAP projects, I uncovered an issue where the node's data subscriptions are not constructed correctly.

Currently, the logic is to construct these subscriptions only when the TargetFramework or TargetFrameworks properties change.

For a regular .NET project this is fine as that property will be defined, and when it is first observed it will trigger the subscriptions that allow the Dependencies node to function correctly.

For a project type that does not define these properties (i.e. WAP projects) this logic is incorrect.

The real fix is to tackle #6183. In the meantime we need a simple fix to unblock WAP projects.

@drewnoakes drewnoakes added Bug Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references labels Feb 19, 2021
@drewnoakes drewnoakes added this to the 16.10 milestone Feb 19, 2021
@drewnoakes drewnoakes self-assigned this Feb 19, 2021
@drewnoakes
Copy link
Member Author

cc: @edwardskrod

drewnoakes added a commit to drewnoakes/project-system that referenced this issue Feb 19, 2021
Fixes dotnet#6974

Currently, the logic is to construct these subscriptions _only_ when the `TargetFramework` or `TargetFrameworks` properties change.

For a regular .NET project this is fine as that property will be defined, and when it is first observed it will trigger the subscriptions that allow the Dependencies node to function correctly.

For a project type that does not define these properties (i.e. WAP projects) this logic is incorrect.

This fix ensures a `AggregateCrossTargetProjectContext` when the current instance is null.
drewnoakes added a commit to drewnoakes/project-system that referenced this issue Feb 19, 2021
Fixes dotnet#6974

Currently, the logic is to construct these subscriptions _only_ when the `TargetFramework` or `TargetFrameworks` properties change.

For a regular .NET project this is fine as that property will be defined, and when it is first observed it will trigger the subscriptions that allow the Dependencies node to function correctly.

For a project type that does not define these properties (i.e. WAP projects) this logic is incorrect.

This fix ensures a `AggregateCrossTargetProjectContext` when the current instance is null.
@ghost ghost closed this as completed in #6975 Feb 19, 2021
@ghost ghost added the Resolution-Fixed The bug has been fixed, refer to the milestone to see in which release it was fixed. label Feb 19, 2021
@drewnoakes drewnoakes removed the Bug label Oct 16, 2024
This issue was closed.
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.
Projects
None yet
1 participant