Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/core/compatibility/10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
| [.NET CLI `--interactive` defaults to `true` in user scenarios](sdk/10.0/dotnet-cli-interactive.md) | Behavioral change | Preview 3 |
| [.NET tool packaging creates RuntimeIdentifier-specific tool packages](sdk/10.0/dotnet-tool-pack-publish.md) | Behavioral change | Preview 6 |
| [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 |
| [`dotnet new sln` defaults to SLNX file format](sdk/10.0/dotnet-new-sln-slnx-default.md) | Behavioral change | RC 1 |
| [`dotnet package list` performs restore](sdk/10.0/dotnet-package-list-restore.md) | Behavioral change | Preview 4 |
| [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 |
| [project.json not supported in `dotnet restore`](sdk/10.0/dotnet-restore-project-json-unsupported.md) | Source incompatible | Preview 7 |
Expand Down
65 changes: 65 additions & 0 deletions docs/core/compatibility/sdk/10.0/dotnet-new-sln-slnx-default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: "Breaking change - `dotnet new sln` defaults to SLNX file format"
description: "Learn about the breaking change in .NET 10 where `dotnet new sln` creates SLNX-format solution files instead of SLN-format files."
ms.date: 08/30/2025
ai-usage: ai-assisted
ms.custom: https://github.com/dotnet/docs/issues/48192
---

# `dotnet new sln` defaults to SLNX file format

In .NET 10, `dotnet new sln` generates an [SLNX-format](https://devblogs.microsoft.com/visualstudio/new-simpler-solution-file-format/) solution file instead of an SLN-formatted solution file.

## Version introduced

.NET 10 RC 1

## Previous behavior

Previously, `dotnet new sln` created a SLN-format solution file similar to:

```sln
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
```

## New behavior

Starting in .NET 10, `dotnet new sln` creates a SLNX-format solution file similar to:

```xml
<Solution>
</Solution>
```

## Type of breaking change

This change is a [behavioral change](../../categories.md#behavioral-change).

## Reason for change

The .NET SDK [added support for SLNX files](https://devblogs.microsoft.com/dotnet/introducing-slnx-support-dotnet-cli/) in version 9.0.200, and it's proven to be a stable, understandable format for developers. It's well-supported by all major .NET tooling and is much easier for developers to maintain. This breaking change aims to encourage the use of the SLNX format.

## Recommended action

If you desire an SLN-formatted solution file, pass the `--format sln` option to the command:

`dotnet new sln --format sln`

## Affected APIs

None.

## See also

- [.NET default templates for dotnet new](../../../tools/dotnet-new-sdk-templates.md)
2 changes: 2 additions & 0 deletions docs/core/compatibility/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ items:
href: sdk/10.0/dotnet-restore-project-json-unsupported.md
- name: Default workload configuration from 'loose manifests' to 'workload sets' mode
href: sdk/10.0/default-workload-config.md
- name: "`dotnet new sln` defaults to SLNX file format"
href: sdk/10.0/dotnet-new-sln-slnx-default.md
- name: "`dotnet package list` performs restore"
href: sdk/10.0/dotnet-package-list-restore.md
- name: MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed
Expand Down
11 changes: 7 additions & 4 deletions docs/core/tools/dotnet-sln.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: dotnet sln command
description: The dotnet-sln command provides a convenient option to add, remove, and list projects in a solution file.
ms.date: 03/26/2025
ms.date: 08/29/2025
---
# dotnet sln

Expand All @@ -27,24 +27,27 @@ The `dotnet sln` command provides a convenient way to list and modify projects i

To use the `dotnet sln` command, the solution file must already exist. If you need to create one, use the [dotnet new](dotnet-new.md) command with the `sln` template name.

The following example creates a *.sln* file in the current folder, with the same name as the folder:
The following example creates an *.slnx* file in the current folder, with the same name as the folder:

```dotnetcli
dotnet new sln
```

The following example creates a *.sln* file in the current folder, with the specified file name:
The following example creates an *.slnx* file in the current folder, with the specified file name:

```dotnetcli
dotnet new sln --name MySolution
```

The following example creates a *.sln* file in the specified folder, with the same name as the folder:
The following example creates an *.slnx* file in the specified folder, with the same name as the folder:

```dotnetcli
dotnet new sln --output MySolution
```

> [!NOTE]
> In .NET 9 and earlier versions, `dotnet new sln` creates an *.sln* file instead of an *.slnx* file.

## Arguments

- **`SOLUTION_FILE`**
Expand Down
Loading