How to specify filter order of a project in visual studio?

Since the purpose of filters is to show the logic of a project, where is this function?

For some reason, top level filters always get stuck between my Header Files and Source Files. Its not even alphabetical.

Please note that I am not interested in ordering my projects, but filters within my projects.

So how can I specify the order of my filters, or at least sort them alphabetically?

+3


source to share


1 answer


In Visual Studio 2012, a new filter is added in alphabetical order by default. But later renames have no effect. Not very convenient, but we can get the desired result:

Workaround:

  • Before adding a folder: add "a" to each folder name that you want to be above the new one. Add "zz_" to each folder, below the new new one.

  • Add a new folder.

  • Rename all your folders.



It's tiring, but still better than nothing.

Workaround: . If you want to add multiple new folders, just add them to the line and rename them later to be in the correct order.

Workaround: Editing the project XML directly might work. But I personally prefer not to touch such a magic file.

+1


source







All Articles