Szyszka947
Szyszka947

Reputation: 912

Can I download only necessary NuGet packages and skip transitive dependencies?

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

Upvotes: 0

Views: 119

Answers (1)

Jocke
Jocke

Reputation: 2294

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.

Upvotes: 6

Related Questions