Skip to content

Commit 4f759b3

Browse files
authored
add file-based app info for dotnet-restore
1 parent bc4764f commit 4f759b3

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

docs/core/tools/dotnet-restore.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: dotnet restore command
33
description: Learn how to restore dependencies and project-specific tools with the dotnet restore command.
4-
ms.date: 07/19/2023
4+
ms.date: 09/24/2025
55
---
66
# dotnet restore
77

8-
**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions
8+
**This article applies to:** ✔️ .NET 6 and later versions
99

1010
## Name
1111

@@ -14,7 +14,7 @@ ms.date: 07/19/2023
1414
## Synopsis
1515

1616
```dotnetcli
17-
dotnet restore [<ROOT>] [--configfile <FILE>] [--disable-build-servers]
17+
dotnet restore [<PROJECT>|<SOLUTION>|<FILE>] [--configfile <FILE>] [--disable-build-servers]
1818
[--disable-parallel]
1919
[-f|--force] [--force-evaluate] [--ignore-failed-sources]
2020
[--interactive] [--lock-file-path <LOCK_FILE_PATH>] [--locked-mode]
@@ -86,9 +86,15 @@ There are three specific settings that `dotnet restore` ignores:
8686

8787
## Arguments
8888

89-
- **`ROOT`**
89+
`PROJECT | SOLUTION | FILE`
9090

91-
Optional path to the project file to restore.
91+
The project or solution or C# (file-based program) file to restore. If a file isn't specified, MSBuild searches the current directory for a project or solution.
92+
93+
* `PROJECT` is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file. If the directory is not specified, it defaults to the current directory.
94+
95+
* `SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file. If the directory is not specified, it defaults to the current directory.
96+
97+
* `FILE` is the path and filename of a file-based app. Files-based apps are programs contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
9298

9399
## Options
94100

0 commit comments

Comments
 (0)