Home > Software design >  Download only necessary NuGet packages
Download only necessary NuGet packages

Time:09-20

When I want to do my own NuGet package with custom authentication scheme, I need to download Microsoft.AspNetCore.Authentication that contains AuthenticationScheme class. I need only this one class but together with this package there is downloaded 36 transitive packages. How can I reject these packages? Is it possible?

CodePudding user response:

When you take onboard a new dependency you implicitly takes on its transitive dependencies. If you start messing with it then code you want to depend on will not work. It is just the price you pay for the dependency.

  • Related