.slnx .NET Solution Format: Modern, Clear & XML-based

What is the .slnx .NET Solution format?

With the release of the .NET SDK 9.0.200 Microsoft is introducing a new file format for solution files: .slnx. This format is based on XML, is clearly structured, significantly shorter than classic .sln files – and fully compatible with existing project structures.

The goal: To offer developers a simpler, more maintainable, and version-control-friendly alternative to the old format. Especially in modern DevOps and CI/CD environments, .slnx offers many advantages.

Why should you switch from .sln to .slnx?

The classic .sln file has been in use for decades – but it's difficult to read, prone to merge conflicts, and unnecessarily complex. The new .slnx .NET Solution format offers several advantages:

  • Clearer structure through XML
  • Less clutter: unnecessary information is eliminated.
  • Improved readability and editability directly in the editor
  • Clear project references without GUID confusion

All relevant data is retained – what is not visible in the new format is considered standard and no longer needs to be explicitly declared.

Migration: How to easily switch to .slnx

Switching to the new format is straightforward:

  • In Visual Studio (from version 17.14) Under "Preview Features" you can activate the option for the new file format and save existing .sln files as .slnx.
  • Alternatively, via the .NET CLI Starting with SDK 9.0.200, a dedicated migration command is available. This allows existing .sln files to be converted to .slnx files in just a few seconds.

The result is a modern, compact solution file that is significantly easier to maintain – especially in teams.

.slnx in the CLI: Work as usual – only better

  • After the migration, everything works as before. You can:

    • building solutions
    • Add or remove projects
    • List projects within the solution

    The commands and workflows remain identical to the classic .sln – the only difference is that you are working with a file that is easier to understand and version.

    Just be careful not to keep both .sln and .slnx files in the same directory. In such cases, the specific filename must be specified in CLI commands, otherwise a conflict will occur.

Tooling compatibility: Where .slnx is already supported

The new .slnx .NET Solution format is already supported by important tools:

  • Visual Studio reads .slnx files when the corresponding option is enabled.
  • C# Dev Kit for Visual Studio Code can use .slnx if you specify the path in the configuration.
  • JetBrains Rider offers initial support in the EAP channel.
  • Some tools, such as slngen or dotnet list package, will also receive full support soon.

For teams, it is recommended to plan the migration in a coordinated manner to avoid tool incompatibilities.

Conclusion: .slnx brings structure and clarity to your .NET projects.

With the new .slnx .NET Solution format, Microsoft is taking a significant step towards transparency, maintainability, and CI/CD compatibility. .slnx is a real asset, especially for teams working with numerous repositories, pull requests, and automated pipelines.