How to add nuget package to project in visual studio

How to add nuget package to project visual studio

In this tutorial i am going to explain about How to add nuget package to project visual studio. In my previous tutorial i have explained about

Implementation :

Now we will see the implementation of How to add nuget package to project visual studio. We can add nuget package to the project in visual studio in two ways. Now we will see one by one.



First method:

In this method right click on project and choose Manage NuGet Packages option. It will open the window where we will see the list of already installed packages,all other available packages and the packages with updates. You can search the package and install it to the project from here. Please refer the below screenshot.

One way of adding nuget package to project visual studio

Second method:

Another way of installing nuget package to project is using Package Manager Console. Go to Nuget Gallery website and search for the required package. Refer the below screenshot.

Second way of adding nuget package to project visual studio

I have searched for entity framework and copied the below command.

Now go to visual studio, from tools menu choose Nuget Package Manager => Package Manager Console option. And in the package manager console window paste the copied command and press enter. It will install the package.

Conclusion:

Hope you learned  How to add nuget package to project visual studio. Do you like this tutorial? Help us to improve. Please post your comments and feedback below.

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!