Skip to content
| Marketplace
Sign in
Visual Studio>Tools>SolutionFileSorter
SolutionFileSorter

SolutionFileSorter

Klara Koščević

|
276 installs
| (2) | Free
SolutionFileSorter provides the functionality to alphabetically sort projects within an open .sln file. Two methods of sorting projects: via a button and upon closing the solution.
Download

###Introduction

Merge conflicts are a common challenge when collaborating on software projects. These conflicts occur when multiple contributors make changes to a project simultaneously, leading to conflicts in the code.

This extension primary purpose is to prevent merge conflicts when new projects are added to a solution. By ensuring that projects are sorted alphabetically, this extension minimizes the chances of conflicts arising during collaborative development.


The project sorting extension allows you to quickly and easily sort projects within Visual Studio solution (.sln files). The extension can be run in two ways: automatically or manually. Here's how to do it:

Automatically:

Automatic extension startup depends on several factors, including Visual Studio settings. The way it functions is as follows:

  1. Close solution in Visual Studio
  2. The extension will automatically sort projects when Visual Studio is closed if the "Automatically sort .sln file on closing solution" setting is enabled, which is default state. Sorting will not be performed if projects are already sorted in the .sln file, even when the setting is enabled.
  3. If the projects are not sorted before the sorting process is done, a prompt window will open asking for confirmation.

Manually:

  1. Open solution in Visual Studio
  2. Go to the toolbar and select "Tools".
  3. In the drop-down menu find and click "Sort projects in .sln file". If projects have already been sorted or if only a single project exists, the sort button will not be available.
  4. After pressing the sorting button, a confirmation message box will open.
  5. Sorting changes the content of currently open solution file and Visual Studio will prompt on this change outside the environment, asking to reload the solution or ignore changes. You should press Reload to sync environment with actual content, although there will be no changes in the environment.

ManuallyExtension.png

Settings

You can also configure the display of notifications shown when sorting is complete in the extension settings. By default, the window is always displayed after each sorting. To change it go to "Tools" -> Options" - "Sort projects in .sln file". In the settings, you have the option to change the display of message boxes and automatic sorting.

SettingsExtension.png


Known Issuse

When Visual Studio detects changes in the solution file, a dialog will appear, notifying you about the changes and asking if you want to load the modified .sln file. It is important to note that, if you choose not to load the modified .sln file, the sorting effect may be lost. We recommend always selecting the option to load changes to preserve the sorting of your project.


Addition: If you want the same functionality from the console application, the entire solution is available on GitHub, where you can download the code for the console application and install it on your computer.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft