The steps below describe how to use NuGet packages and the gallery.
Before we dive into the details of NuGet, we first need to understand what NuGet is and what it is used for. Nuget is a library sharing mechanism. It allows developers to create and share packages. These packages are containers for code. Microsoft uses NuGet to publish a number of useful packages (Entity Framework is one very useful example.) Nuget can be used by any developer to share code with the Visual Studio Community.
Nuget has two primary interfaces:
We will examine each interface in turn and describe how to use it within the context of a Visual Studio project.
Let's begin by exploring the user interface (UI):
Now let's take a look at the Package Manager Console.
Note: When working with packages, be aware of package version numbers. Often, package updates can contain breaking changes that require extensive changes to your project.