Skip to content

Adding a second item-template file (Form, Class, etc.) to an SDK-style project can freeze the IDE #2078

Description

@fforay

Adding two or more files based on any X# item template that lists a block (Form, Class, UserControl, WPF items, etc.) to the same SDK-style (.NET Core) project can freeze Visual Studio permanently.

To Reproduce

  1. Create any SDK-style (.NET Core) X# WinForms/console project.
  2. Add New Item -> a second file of any template that lists
    (e.g. a second Class, or a second Form).
  3. Add a third such item, or do anything else that needs to enumerate the
    References/Dependencies node -- IDE freezes.

Diagnosed via live debugger attach: a reference node's own nextSibling
field pointed back to itself.

Fix:
guard HierarchyNode.AddChild against ever re-linking a node that's already a member of the target children list.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions