What is NuGet? (original) (raw)

Last Updated : 22 Jun, 2020

NuGet is the official package-manager for .NET. Packages are basically compiled library with some descriptive metadata. NuGet is an essential tool for any modern development platform is a mechanism through which developers can create, share, and consume useful code. Often such code is bundled into "packages" that contain compiled code along with other content needed in the projects that consume these packages. NuGet package contains a single ZIP file with the extension of .nupkg that consists of compiled code (DLLs), and information like the package's version number.

NuGet itself handles all of the intermediate details, for example if a developer with code who wants to share create a package and publish them on a public or private host. Package consumers then obtain those packages from the suitable hosts, and add them to their projects, and at last call a package functionality in their code. NuGet packages code that is developed by an organization can be used as it supports private hosts along with the public nugget.org host. NuGet packages can also be used in a convenient way to factor your code by using it in your projects. Nuget is considered as a shareable unit of code, but it doesn’t require any specific means of sharing.

It Provides:

NuGet helps in the overall dependency graph, this leads to avoiding multiple references to different versions of the same package. Some of the utility packages are employed by many other packages. So you could easily have more references to different versions of the same package. To avoid bringing the different versions of the same package into your project, NuGet sorts out which single version can be used by all the consumers. i.e. it solves dependency problems in one’s own project.