You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/quickstart/install-and-use-a-package-using-the-dotnet-cli.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,24 +9,25 @@ ms.topic: quickstart
9
9
10
10
# Quickstart: Install and use a package with the dotnet CLI
11
11
12
-
NuGet packages contain compiled binary code that developers make available for other developers to use in their projects. For more information, see [What is NuGet](../What-is-NuGet.md). This quickstart describes how to install the popular [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json) NuGet package into a .NET project by using the [dotnet add package](/dotnet/core/tools/dotnet-add-package) command.
12
+
In this quickstart, you install the popular [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json) NuGet package into a .NET project by using the [dotnet add package](/dotnet/core/tools/dotnet-add-package) command. NuGet packages contain compiled binary code that developers make available for other developers to use in their projects. For more information, see [What is NuGet](../What-is-NuGet.md).
13
13
14
14
You refer to installed packages in code with a `using <namespace>` directive, where `<namespace>` is often the package name. You can then use the package's API in your project.
15
15
16
16
> [!Tip]
17
-
> Browse [nuget.org/packages](https://nuget.org/packages) to find packages you can reuse in your own applications. You can search directly at [https://nuget.org](https://nuget.org/packages), or find and install packages from within Visual Studio. For more information, see [Find and evaluate NuGet packages for your project](../consume-packages/finding-and-choosing-packages.md).
17
+
> Browse [nuget.org/packages](https://nuget.org/packages) to find packages you can reuse in your own applications. You can search directly at [https://nuget.org](https://nuget.org/packages), or you can find and install packages from within Visual Studio. For more information, see [Find and evaluate NuGet packages for your project](../consume-packages/finding-and-choosing-packages.md).
18
18
19
19
## Prerequisites
20
20
21
-
- The [.NET SDK](https://www.microsoft.com/net/download), which provides the `dotnet` command-line tool. Starting in Visual Studio 2017, the dotnet CLI automatically installs with any .NET or .NET Core related workloads.
21
+
- Visual Studio 2026. You can install the 2026 Community edition for free from [visualstudio.microsoft.com](https://visualstudio.microsoft.com/), or you can use the Professional or Enterprise edition.
22
+
- The [.NET SDK](https://www.microsoft.com/net/download), which provides the `dotnet` command-line interface (CLI). In Visual Studio, the dotnet CLI automatically installs with any .NET-related workloads.
22
23
23
24
## Create a project
24
25
25
-
You can install NuGet packages into a .NET project. For this walkthrough, create a simple .NET console project by using the dotnet CLI, as follows:
26
+
You can install NuGet packages into a .NET project. For this quickstart, take the following steps to create a basic .NET console project by using the dotnet CLI:
26
27
27
28
1. Create a folder named *Nuget.Quickstart* for the project.
28
29
29
-
1. Open a command prompt and switch to the new folder.
30
+
1. Open a command prompt window and go to the new folder.
30
31
31
32
1. Create the project by using the following command:
32
33
@@ -44,11 +45,11 @@ You can install NuGet packages into a .NET project. For this walkthrough, create
44
45
dotnet add package Newtonsoft.Json
45
46
```
46
47
47
-
2. After the command completes, open the *Nuget.Quickstart.csproj* file in Visual Studio to see the added NuGet package reference:
48
+
2. After the command finishes, open the *Nuget.Quickstart.csproj* file in Visual Studio to see the added NuGet package reference:
@@ -89,7 +90,7 @@ You can install NuGet packages into a .NET project. For this walkthrough, create
89
90
}
90
91
```
91
92
92
-
1. Save the file, then build and run the app by using the `dotnet run` command. The output is the JSON representation of the `Account` object in the code:
93
+
1. Save the file, and then build and run the app by using the `dotnet run` command. The output is the JSON representation of the `Account` object in the code:
93
94
94
95
```output
95
96
{
@@ -99,9 +100,7 @@ You can install NuGet packages into a .NET project. For this walkthrough, create
99
100
}
100
101
```
101
102
102
-
Congratulations on installing and using your first NuGet package!
0 commit comments