Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the point of Nuget packages?

Maybe I'm doing something wrong or expressing pure ignorance here, but I can't really see how Nuget packages are beneficial? I recently decided to install a number of Nuget packages to replace the static DLLs in my application. When I inspect the folders that are created by the packages they seem to include many different versions of the DLL all nested under an array of sub directories.

Don't all these files, many of which appear to be redundant increase the overall size of the application and slow down the publish and deploy routine? Also which items should be placed into source control?

Like I said I may be missing something here but can anybody enlighten me on the virtues of Nuget packages? I'm starting to think that a simple dll in the bin folder worked perfectly fine?

like image 537
QFDev Avatar asked Mar 07 '13 11:03

QFDev


People also ask

What is the use of NuGet package explain with examples?

For example, package creators use the nuget pack command to create a package from various assemblies and related files, package consumers use nuget install to include packages in a project folder, and everyone uses nuget config to set NuGet configuration variables.

What is the use of NuGet in Visual Studio?

A NuGet package contains reusable code that other developers have made available to you for use in your projects. You can install a NuGet package in a Microsoft Visual Studio project by using the NuGet Package Manager, the Package Manager Console, or the . NET CLI.

What happens when you install a NuGet package?

NuGet creates a subfolder for each package identifier, then creates subfolders for each installed version of the package. NuGet installs package dependencies as required. This process might update package versions in the process, as described in Dependency Resolution.

What is the purpose of the NuGet package manager in asp net core?

The NuGet Package Manager can be used to search and install NuGet packages in the Visual Studio solution or project. Right-click the project or solution in the Solution Explorer tab, and choose Manage NuGet Packages…


1 Answers

  1. Each package knows what other packages - and specifically what versions thereof - it depends on. That helps to make sure all libraries are compatible.
  2. You still only should deploy that DLL version you actually need
  3. You can decide to not put any DLLs into your source control, because NuGet has a "Package Restore" feature that automatically loads missing packages on build.
  4. You have a central place for all your dependencies: Just right-click on your project and choose the packages you need. No more searching for download links etc.
like image 187
Daniel Hilgarth Avatar answered Oct 07 '22 00:10

Daniel Hilgarth