Technology

Revolutionary Change Alert: Microsoft Unveils New .slnx Solution File Support in .NET CLI!

2025-04-25

Author: Olivia

In an exciting announcement, Microsoft has rolled out experimental support for the innovative .slnx file format in the latest .NET CLI version 9.0.200. This bold move aims to streamline the developer experience across .NET tooling, tackling the clutter and complexity associated with traditional solution files.

Historically, developers have relied on .sln files for Visual Studio solutions, but these come with numerous headaches—from cumbersome manual maintenance of project references to messy path dependencies and complicated code merges. Just look at a standard .sln file: it’s verbose and can become a daunting task to manage.

Now, enter the .slnx format! This groundbreaking alternative, based on XML and set to debut in 2024, offers a clean, flexible solution that mirrors the efficiency of Visual Studio project files. With its minimal footprint, the .slnx format eliminates redundant information, ensuring a human-readable structure that significantly reduces errors during manual editing.

Imagine a solution file like this: <Solution> <Project Path="DotNetMonitorWebApp\DotNetMonitorWebApp.csproj" /> </Solution> It’s concise and crystal clear!

Notably, MSBuild has been on board with the .slnx format since version 17.13, and with the new support in .NET CLI, developers can seamlessly execute dotnet commands like dotnet build and dotnet test using .slnx files. However, Visual Studio users might need to enable the 'Use Solution File Persistence Model' found in the Environment / Preview Features to unlock this new capability.

For those looking to upgrade, a handy dotnet command called migrate makes it easy to transform existing .sln files into the new format. Alternatively, you can right-click the solution node in Visual Studio's Solution Explorer (if the preview option is enabled) and save it in the updated format. A key recommendation from Microsoft is to maintain either .sln or .slnx in your solution folder—never both!

While the .slnx format remains in its preview stage, Microsoft actively encourages developers to test this format in their workflows and share their valuable feedback with the tooling teams. The ultimate goal? To establish .slnx as the standard format across Visual Studio and the .NET CLI!

In another exciting development, Microsoft has introduced the Microsoft.VisualStudio.SolutionPersistence library, allowing programmatic access to both .sln and .slnx file operations. This empowers third-party tools to harness the benefits of the new solution format without the need for complex parsers.

Stay tuned for more updates, and get ready to supercharge your .NET development experience!