Skip to content
Open
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
9 changes: 7 additions & 2 deletions docs/core/tools/dotnet-format.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: dotnet format command
description: The dotnet format command formats code to match EditorConfig settings for the current directory.
ms.date: 09/29/2025
ms.date: 09/15/2026
ai-usage: ai-assisted
---
# dotnet format

Expand All @@ -17,7 +18,7 @@ ms.date: 09/29/2025
dotnet format [<PROJECT | SOLUTION>]
[--binarylog <BINARY-LOG-PATH>] [--diagnostics <DIAGNOSTICS>]
[--exclude <EXCLUDE>] [--exclude-diagnostics <EXCLUDE-DIAGNOSTICS>]
[--include <INCLUDE>] [--include-generated]
[--framework <FRAMEWORK>] [--include <INCLUDE>] [--include-generated]
[--no-restore] [--report <REPORT-PATH>] [--severity <LEVEL>]
[-v|--verbosity <LEVEL>] [--verify-no-changes] [--version]

Expand Down Expand Up @@ -57,6 +58,10 @@ None of the options below are required for the `dotnet format` command to succee

A space-separated list of diagnostic IDs to exclude when fixing code style or third-party issues. Default value is none. For a list of built-in analyzer rule IDs that you can specify, see the [list of IDs for code-analysis style rules](../../fundamentals/code-analysis/style-rules/index.md).

- **`--framework <FRAMEWORK>`**

Specifies the target framework moniker (TFM), such as `net11.0`, to format in a multi-targeted project. If you don't specify this option, `dotnet format` formats all target frameworks. Available starting with .NET 11.

- **`--include <INCLUDE>`**

A space-separated list of relative file or folder paths to include in formatting. The default is all files in the solution or project.
Expand Down
10 changes: 7 additions & 3 deletions docs/core/tools/dotnet-new-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: dotnet new install
ai-usage: ai-assisted
description: The dotnet new install command installs a template package.
ms.date: 11/12/2025
ms.date: 09/15/2026
---
# dotnet new install

Expand All @@ -15,15 +15,15 @@ ms.date: 11/12/2025
## Synopsis

```dotnetcli
dotnet new install <PATH|NUGET_ID> [--interactive] [--add-source|--nuget-source <SOURCE>] [--force]
dotnet new install <PATH|NUGET_ID> [--interactive] [--add-source|--nuget-source <SOURCE>] [--force] [--prerelease]
[-d|--diagnostics] [--verbosity <LEVEL>] [-h|--help]
```

## Description

The `dotnet new install` command installs a template package from the `PATH` or `NUGET_ID` provided. If you want to install a specific version or prerelease version of a template package, specify the version in the format `<package-name>@<package-version>`. (The colon separator `::` was deprecated in favor of the `@` character in .NET 9.0.200 SDK.) By default, `dotnet new` passes \* for the version, which represents the latest stable package version. For more information, see the [Examples](#examples) section.

If a version of the template package was already installed when you run this command, the template package will be updated to the specified version. If no version is specified, the package is updated to the latest stable version.
If a version of the template package was already installed when you run this command, the template package will be updated to the specified version. If no version is specified, the package is updated to the latest stable version unless you specify the `--prerelease` option.
Starting with .NET SDK 6.0.100, if the argument specifies the version, and that version of the NuGet package is already installed, it won't be reinstalled.
If the argument is a `PATH` and it's already installed, it won't be reinstalled.

Expand Down Expand Up @@ -75,6 +75,10 @@ Starting with .NET SDK 6.0.100, installed template packages are available in lat

- [!INCLUDE [interactive](includes/cli-interactive.md)]

- **`--prerelease`**

Selects the latest available version, including prerelease versions, when you don't specify a template package version. If you specify a package version, such as `Contoso.Templates@2.0.0-preview.3`, the command selects that exact version. Available since .NET SDK 11.

- [!INCLUDE [verbosity](includes/cli-verbosity.md)]

## Examples
Expand Down
9 changes: 7 additions & 2 deletions docs/core/tools/dotnet-reference-add.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: dotnet reference add command
description: The dotnet reference add command provides a convenient option to add project-to-project references.
ms.date: 10/28/2025
ms.date: 09/15/2026
ai-usage: ai-assisted
---
# dotnet reference add

Expand All @@ -17,7 +18,7 @@ ms.date: 10/28/2025
## Synopsis

```dotnetcli
dotnet reference add reference [-f|--framework <FRAMEWORK>]
dotnet reference add reference [--file <FILE>] [-f|--framework <FRAMEWORK>]
[--interactive] <PROJECT_REFERENCES> [--project <PROJECT>]

dotnet reference add -h|--help
Expand Down Expand Up @@ -60,6 +61,10 @@ There's no CLI command to add a reference to an assembly that isn't in a project

## Options

- **`--file <FILE>`**

Specifies the file-based app to add project references to. For example, specify `app.cs` to add `#:project` directives to a file-based app. Available starting with .NET 11.

- **`-f|--framework <FRAMEWORK>`**

Adds project references only when targeting a specific [framework](../../standard/frameworks.md) using the TFM format.
Expand Down
46 changes: 34 additions & 12 deletions docs/core/tools/dotnet-sln.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
---
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: 10/28/2025
ai-usage: ai-assisted
description: The dotnet-sln command provides a convenient option to add, remove, and list projects in a solution file or solution filter.
ms.date: 09/16/2026
---
# dotnet sln

**This article applies to:** ✔️ .NET 6 SDK and later versions

## Name

`dotnet sln` - Lists or modifies the projects in a .NET solution file, or migrates the file to an *.slnx* file.
`dotnet sln` - Lists or modifies the projects in a .NET solution file or solution filter, or migrates an *.sln* file to an *.slnx* file.

## Synopsis

Expand All @@ -21,7 +22,7 @@ dotnet sln [command] -h|--help

## Description

The `dotnet sln` command provides a convenient way to list and modify projects in a solution file.
The `dotnet sln` command provides a convenient way to list and modify projects in a solution file or solution filter.

### Create a solution file

Expand All @@ -48,13 +49,21 @@ dotnet new sln --output MySolution
> [!NOTE]
> In .NET 9 and earlier versions, `dotnet new sln` creates an *.sln* file instead of an *.slnx* file.

### Create a solution filter

Starting with .NET 11, you can create a [solution filter](/visualstudio/msbuild/solution-filters) (*.slnf* file) with the `slnf` template:

```dotnetcli
dotnet new slnf --name MyApp.slnf
```

## Arguments

- **`SOLUTION_FILE`**

The solution file to use (either an *.sln* or *.slnx* file).
The solution file (*.sln* or *.slnx* file) or solution filter (*.slnf* file) to use.

If unspecified, the command searches the current directory for an *.sln* or *.slnx* file and, if it finds exactly one, uses that file. If multiple solution files are found, the user is prompted to specify a file explicitly. If none are found, the command fails.
If unspecified, the command searches the current directory for an *.sln*, *.slnx*, or *.slnf* file and, if it finds exactly one, uses that file. If multiple solution files or filters are found, the user is prompted to specify a file explicitly. If none are found, the command fails.

## Options

Expand Down Expand Up @@ -108,13 +117,15 @@ dotnet sln add [-h|--help]

- **`SOLUTION_FILE`**

The solution file to use (either an *.sln* or *.slnx* file).
The solution file (*.sln* or *.slnx* file) or solution filter (*.slnf* file) to use.

If unspecified, the command searches the current directory for an *.sln*, *.slnx*, or *.slnf* file and, if it finds exactly one, uses that file. If multiple solution files or filters are found, the user is prompted to specify a file explicitly. If none are found, the command fails.

If unspecified, the command searches the current directory for an *.sln* or *.slnx* file and, if it finds exactly one, uses that file. If multiple solution files are found, the user is prompted to specify a file explicitly. If none are found, the command fails.
(Support for *.slnf* files was added in .NET 11.)

- **`PROJECT_PATH`**

The path to the project or projects to add to the solution. Unix/Linux shell [globbing pattern](https://en.wikipedia.org/wiki/Glob_(programming)) expansions are processed correctly by the `dotnet sln` command.
The path to the project or projects to add to the solution or solution filter. Unix/Linux shell [globbing pattern](https://en.wikipedia.org/wiki/Glob_(programming)) expansions are processed correctly by the `dotnet sln` command.

If `PROJECT_PATH` includes folders that contain the project folder, that portion of the path is used to create [solution folders](/visualstudio/ide/solutions-and-projects-in-visual-studio#solution-folder). For example, the following commands create a solution with `myapp` in solution folder `folder1/folder2`:

Expand Down Expand Up @@ -153,13 +164,15 @@ dotnet sln [<SOLUTION_FILE>] remove [-h|--help]

- **`SOLUTION_FILE`**

The solution file to use (either an *.sln* or *.slnx* file).
The solution file (*.sln* or *.slnx* file) or solution filter (*.slnf* file) to use.

If unspecified, the command searches the current directory for an *.sln*, *.slnx*, or *.slnf* file and, if it finds exactly one, uses that file. If multiple solution files or filters are found, the user is prompted to specify a file explicitly. If none are found, the command fails.

If unspecified, the command searches the current directory for an *.sln* or *.slnx* file and, if it finds exactly one, uses that file. If multiple solution files are found, the user is prompted to specify a file explicitly. If none are found, the command fails.
(Support for *.slnf* files was added in .NET 11.)

- **`PROJECT_PATH` or `PROJECT_NAME`**

The path to, or name of, the project or projects to remove from the solution. Unix/Linux shell [globbing pattern](https://en.wikipedia.org/wiki/Glob_(programming)) expansions are processed correctly by the `dotnet sln` command.
The path to, or name of, the project or projects to remove from the solution or solution filter. Unix/Linux shell [globbing pattern](https://en.wikipedia.org/wiki/Glob_(programming)) expansions are processed correctly by the `dotnet sln` command.

If a project name is provided instead of a path, the project in the solution that matches the name, regardless of its path, is removed. If more than one matching project is found in the solution, the command errors out. Omit the project file extension in the name. (Support for removing projects by name was added in .NET 10.)

Expand Down Expand Up @@ -200,6 +213,15 @@ dotnet sln [<SOLUTION_FILE>] migrate [-h|--help]
dotnet sln todo.slnx list
```

- Create a solution filter, add a project, list the projects, and remove the project:

```dotnetcli
dotnet new slnf --name MyApp.slnf
dotnet sln MyApp.slnf add src/Lib/Lib.csproj
dotnet sln MyApp.slnf list
dotnet sln MyApp.slnf remove src/Lib/Lib.csproj
```

- Add a C# project to a solution:

```dotnetcli
Expand Down
9 changes: 7 additions & 2 deletions docs/core/tools/dotnet-tool-exec.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: dotnet tool exec command
description: The dotnet tool exec command downloads and invokes a .NET tool in one step without permanent installation.
ms.date: 09/06/2025
ms.date: 09/15/2026
ai-usage: ai-assisted
---
# dotnet tool exec

Expand All @@ -18,7 +19,7 @@ dotnet tool exec <PACKAGE_NAME>[@<VERSION>]
[--allow-roll-forward] [-a|--arch <ARCHITECTURE>]
[--add-source <SOURCE>] [--configfile <FILE>] [--disable-parallel]
[--framework <FRAMEWORK>] [--ignore-failed-sources] [--interactive]
[--no-http-cache] [--prerelease] [--source <SOURCE>]
[--no-http-cache] [--prerelease] [--source <SOURCE>] [-y|--yes]
[-v|--verbosity <LEVEL>]
[--] [<tool-arguments>...]

Expand Down Expand Up @@ -81,6 +82,10 @@ This command also exists in two other forms for easier use

Allows prerelease packages to be selected when resolving the version to install.

- **`-y|--yes`**

Accepts all confirmation prompts, including the prompt to download and run the tool package. Use this option only with packages and package sources that you trust. Available starting with .NET 11.

- [!INCLUDE [source](includes/cli-tool-source.md)]

- [!INCLUDE [verbosity](includes/cli-verbosity-normal.md)]
Expand Down
Loading