Skip to content

Adding new or existing items to folders in the Solution Explorer is broken #2178

Closed

Description

@saul

1. Adding new files above/below within a folder does not work correctly.

Repro steps

  1. Select a file that is within a folder node in the Solution Explorer
  2. Right-click, Add Above|Before > New Item

Expected behavior

File is created in the folder.

Actual behavior

File is added to the end of the project. If you look in the project file, the element is added to the correct place, but as the file is created at the project root, doesn't work.

For example, if I were to select Foo.fs and add a new file below called Qux.fs, the project file would look like:

<Compile Include="Folder\Foo.fs">
<Compile Include="Qux.fs">
<Compile Include="Folder\Bar.fs">

2. Adding an existing item to a folder does not work correctly.

Repro steps

  1. Select the project node in the Solution Explorer
  2. Right-click, Add > New/Existing Item
  3. Add a file in a folder

Expected behavior

File is created in/added from the folder.

Actual behavior

File is added to the end of the project, but does not include the folder.

Known workarounds

Create the file outside of VS and manually update the project file :(

Related information

Affects VS 2015 and VS 2017 RC and master (not sure about pre 2015).

Activity

  1. added
    Impact-High
    on Jan 6, 2017
  2. changed the title [-]Adding new files in folders is broken in the Solution Explorer[/-] [+]Adding new or existing items to folders in the Solution Explorer is broken[/+] on Jan 12, 2017
  3. saul commented on Jan 12, 2017

    @saul
    ContributorAuthor

    Added another case where adding new/existing files to a folder is completely broken. @KevinRansom can we add a milestone and area labels to this please?

  4. added this to the milestone on Jan 12, 2017
  5. added a commit that references this issue on Mar 24, 2017
    240efe2
  6. added a commit that references this issue on Apr 20, 2017
    dd18b3e
  7. modified the milestones: , 15.3 on Jun 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Impact-High

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions