[フレーム]
BT

InfoQ Software Architects' Newsletter

A monthly overview of things you need to know as an architect or aspiring architect.

View an example

We protect your privacy.

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Unlock the full InfoQ experience

Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources.

Log In
or

Don't have an InfoQ account?

Register
  • Stay updated on topics and peers that matter to youReceive instant alerts on the latest insights and trends.
  • Quickly access free resources for continuous learningMinibooks, videos with transcripts, and training materials.
  • Save articles and read at anytimeBookmark articles to read whenever youre ready.

Topics

Choose your language

InfoQ Homepage News Microsoft Extends SLNX Solution File Support in .NET CLI

Microsoft Extends SLNX Solution File Support in .NET CLI

Apr 25, 2025 2 min read

Write for InfoQ

Feed your curiosity. Help 550k+ global
senior developers
each month stay ahead.
Get in touch
Listen to this article - 0:00
Audio ready to play
0:00
0:00

Microsoft has announced experimental support for .slnx files in the .NET CLI v9.0.200, unifying the developer experience among the .NET tooling. This new feature aims to remove clutter in the solution file and to reduce friction when working with large solutions.

Traditionally, .sln files have been the standard for Visual Studio solutions, but they come with limitations such as manual maintenance of project references and path dependencies, difficult merging of source code changes, and overall verbosity, as can be seen in this example:

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34511.98
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetMonitorWebApp", "DotNetMonitorWebApp\DotNetMonitorWebApp.csproj", "{1385B389-B20C-4D19-8FE0-85629BC41343}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1385B389-B20C-4D19-8FE0-85629BC41343}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1385B389-B20C-4D19-8FE0-85629BC41343}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1385B389-B20C-4D19-8FE0-85629BC41343}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1385B389-B20C-4D19-8FE0-85629BC41343}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C12E911E-FAA3-4ACE-B6BF-C3605E866483}
EndGlobalSection
EndGlobal

The new .slnx format, based on XML and introduced in 2024, provides a more robust and flexible alternative, similar to project files in Visual Studio. It has a minimal footprint, removing the duplication of information already present in the project files. It uses a human-readable format that reduces the chances of accidental errors when manually editing the solution file.

<Solution>
<Project Path="DotNetMonitorWebApp\DotNetMonitorWebApp.csproj" />
</Solution>

MSBuild already fully supports the .slnx format since version 17.13. The experimental support for .NET CLI in version 9.0.200 allows developers to use .slnx files directly with dotnet commands (e.g., dotnet build, dotnet test). Visual Studio support for the new format might require developers enabling the 'Use Solution File Persistence Model' option listed under Environment / Preview Features.

A new dotnet command called migrate helps developers convert their .sln files into .slnx files. Alternatively, from Visual Studio developers can right-click the solution node in the Solution Explorer and save the solution in the new format (if enabled in the preview options). The official recommendation is to keep either .sln or .slnx file, but not both of them in the solution folder.

The .slnx file format is still officially in preview, with Microsoft encouraging developers to try the new format in their workflows and sharing their feedback with the appropriate tooling team owners. The stated goal is to make the new format the default in both Visual Studio and the .NET CLI tool. According to Microsoft, the new format will also work with legacy .NET Framework solutions.

Microsoft has also released a library called Microsoft.VisualStuidio.SolutionPersistence that allows programmatic access to both .sln and .slnx file operations. This allows third-party tools to leverage the new solution format without having to create a parser for it.

The comments by the developer community are mixed. Some praise the new format for simplicity and straightforward migration. Other developers think that new features such as globbing (dynamic project discovery inside a folder tree) should be added to the new format.

About the Author

Edin Kapić

Show moreShow less

Rate this Article

Adoption
Style

This content is in the .NET topic

Related Topics:

Related Content

The InfoQ Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.

BT

AltStyle によって変換されたページ (->オリジナル) /