Bad
Bad

Reputation: 5289

Custom / manual file sorting in Visual Studio 2015 Solution Explorer

What are the ways (if any) to manually sort files in folders in Solution Explorer, Visual Studio 2015?

It's not convenient to have a lot of files sorted automatically (alphabetically), because you usually want to have them sorted according to your own custom / business logic.

So far, the only solution I think of is to name files 01_xxx.cs, 02_xxx.cs, etc. in each folder. But it's, of course, ugly, because you want your files to be named as classes, and you will also have to rename them whenever they change folders. Are there any other better ways?

There are similar, but not exactly the same questions (Custom file sorting in VS2010 Solution Explorer, Visual studio file sorting order), which are old (or do not have answers), maybe there are some new features or workarounds available as of today?

Upvotes: 2

Views: 2841

Answers (1)

Florian Schaal
Florian Schaal

Reputation: 2660

In the Solution-explorer files are currently sorted alphabetically. The only way currently to 'sort' files is to put them in folders / projects and sort those on name.

solution

AProject

  **Core** //Folder

   - DFile    
   - EFile 
   - GFile

  **DAL** //Folder

   - AFile
   - BFile
   - CFile

BProject

There are some request on the Visual-Studio feedback site mentioning that they are considering this.

https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/7878282-custom-project-order-in-visual-studio-solution

Upvotes: 2

Related Questions