In Visual Studio, how do you change the order of your source files?
By default, it seems that they go in alphabetical order but I want to put them in a more logical order.
To change the order of a file or folder, click the dots on to the left of the folder or file's name that you're interested in. Dragging while clicking will move the file or folder up and down.
In order to set the Build order for your Solution, right-click on the Solution in Solution Explorer and Select Project Build Order: Your Project Dependencies should be set correctly which is used to determine the Build order by Visual Studio.
If you want to change it, click the upper left menu File > Preferences > Settings and search for “explorer. sortOrder”. A dropdown lets you select from five possible options: default – Files and folders are sorted by last modified date, in descending order.
You can't change the order that the Solution Explorer displays your files. If you need a more logical grouping, consider using folders and namespaces.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With