In this article I will explain a tutorial with an example, how to install Nuget package in Visual Studio 2017, 2019, 2022.
Note: This article is supported for following Visual Studio versions: - 2012, 2013, 2015, 2017, 2019 and 2022.
Installing the Nuget package in the project
For illustration purposes, here I am adding System.Web.Optimization DLL package in the project.
Following are the steps for installing package from Nuget.
1. First step is to start the Package Manager Console window by clicking Tools menu, then NuGet Package Manager and finally Package Manager Console.
2. In the Package Manager Console window, type the Nuget command and press Enter key and the package will start installing.
Once the package is installed, a success message will be displayed.