/folder
/sub1
/sub2
Your file should look like:
<ClInclude Include="folder1\file1.h">
<Filter>folder</Filter>
</ClInclude>
<ClInclude Include="folder1\sub1\file2.h">
<Filter>folder\sub1</Filter>
</ClInclude>
<ClInclude Include="folder1\sub2\file3.h">
<Filter>folder\sub2</Filter>
</ClInclude>
<ClInclude Include="folder1\sub1\file2.h">
<Filter>folder\sub1</Filter>
</ClInclude>
<ClInclude Include="folder1\sub2\file3.h">
<Filter>folder\sub2</Filter>
</ClInclude>
<!-- This subfolder was not at the place -->
<ClInclude Include="folder1\file1.h">
<Filter>folder</Filter>
</ClInclude>
遇到相同的问题,尝试添加一个新的筛选器并将一些文件移动到该新筛选器中。在保存“.filter”文件时关闭VS,并重新打开VS,它会恢复旧的筛选器。现在您可以对文件进行排序。
遇到了同样的问题。 解决方法是打开 .vcxproj.user 文件, 删除 true, 重新加载 Visual Studio - 问题解决。