Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Nuget & SDK dependencies in .Net Core project

I was looking into a .net core application recently & I found something I probably missed earlier. There are three types of dependencies :

  • Analyzers
  • Nuget
  • SDK

Analyzers are fair enough, but I am not sure about difference between Nuget & SDK dependency since they are also overlapping for same package in both like for Micosoft.AspNetCore.App(2.1.1) is available in both with all it's related dependencies in both SDK & nuget.

enter image description here

This is by default .net core Asp.net web API with docker without any change in pacakages or dependencies.

Why packages are required in two places as dependencies?

like image 879
Pranav Singh Avatar asked May 03 '19 07:05

Pranav Singh


People also ask

What is NuGet used for?

NuGet provides the tools developers need for creating, publishing, and consuming packages. Most importantly, NuGet maintains a reference list of packages used in a project and the ability to restore and update those packages from that list.

What is the difference between NuGet and NPM?

npm is the command-line interface to the npm ecosystem. It is battle-tested, surprisingly flexible, and used by hundreds of thousands of JavaScript developers every day. On the other hand, NuGet is detailed as "The package manager for . NET".

What is the difference between GitHub and NuGet?

GitHub and NuGet are primarily classified as "Code Collaboration & Version Control" and "Package Managers" tools respectively. Airbnb, Netflix, and Medium are some of the popular companies that use GitHub, whereas NuGet is used by Nexosis, Selligent Marketing Cloud, and advertiise.

How many NuGet packages are there?

There are 304,091 packages Extensions. DependencyInjection. Logging infrastructure default implementation for Microsoft. Extensions.


1 Answers

I was wondering the same thing and while I don't have a direct answer to your question, here is what I found.

Here is my summary:

  • NuGet feels (to me)
    • more lightweight
      • no built-in documentation
    • portable
  • SDK feels
    • more robust
      • Documentation, better Intellisense support, examples, tutorials etc.
    • tightly coupled
      • connected to specific platform or language
      • the Android SDK won't help develpment in iOS and vice versa

Research

NuGet is an open-source package-management system that simplifies the process of incorporating libraries into a project.

SDK can (and probably should have) Documentation, Tutorials, Debugging assistance in addition to API's and/or Code libraries. i.e. Platform and/or language specific. See What is an SDK

Over at this NuGet versus SDK as a project reference page on Visual Studio Docs, they have a grid comparing and contrasting the two. It got more technical than I could follow, but it gave me a general feeling of what is the right direction for my solution.

like image 130
SqRL Avatar answered Sep 27 '22 19:09

SqRL