Skip to content

Feature Request: Add option to make filters match file system path #4

@Grifplex

Description

@Grifplex

Installed product versions

  • Visual Studio: 2015, 2017, 2019 Enterprise
  • This extension: 1.0.13

Description

Thank you so much for this Awesome extension that should be the way Visual Studio works!
A colleague likes to use the "Show All Files" function of the Solution Explorer. When he add files to the project they are added without a filter specified. Could this extension add missing filter folders to match the path on disk?

Steps to recreate

  1. Create a project
  2. Select "Show All Files" in Solution Explorer
  3. Add files in sub-folders
  4. Save project

Current behavior

Filters of files added have missing filter paths i.e.:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <ClCompile Include="src\Main.cpp" />
    <ClCompile Include="src\Class1\Class1.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="src\Main.hpp" />
    <ClInclude Include="src\Class1\Class1.hpp />
  </ItemGroup>
</Project>

Expected behavior

Add missing Filters for the added files, i.e.:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <ClCompile Include="src\Main.cpp">
      <Filter>src</Filter>
    </ClCompile>
    <ClCompile Include="src\Class1\Class1.cpp">
      <Filter>src\Class1</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="src\Main.hpp">
      <Filter>src</Filter>
    </ClInclude>
    <ClInclude Include="src\Class1\Class1.hpp">
      <Filter>src\Class1</Filter>
    </ClInclude>
  <ItemGroup>
    <Filter Include="src" />
    <Filter Include="src\Class1" />
  </ItemGroup>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions