Search code examples
visual-studiovisual-studio-2019

Why filters are no longer working after migrating to Visual Studio 2019?


After migrating from VS 2015 to VS 2019, filters for Solution Explorer do not work anymore. Why?

In VS 2015, and in order to categorize files in the Solution Explorer without creating physical folders, I have .filters file for each project. Filters show same-type files in a sorted order in the Solution Explorer (on a per-folder basis: Headers, Source, Debug ... etc). Right now, it is not working. And if I do Add->Existing for each project, and choose the respective filter for the selected project, I see no difference (even after unloading/loading, closing/opening VS.. etc)

I went through the filters file and made sure that nothing is wrong with them and all project's file are actually list. Any one can help?

VS 2015:

enter image description here

VS 2019:

enter image description here


Solution

    1. Delete .vs folder from project directory.
    2. Copy existing filter file to the project directory.
    3. Open the project. Now the filters should be available.