I have a Web API project in .NET core. It has a dependency to Microsoft.AspNetCore.App by default.
I need to access some of the package's dependencies in another class library project that I have. Let's say that I need Microsoft.Extensions.Configuration.Abstractions.
Visual studio suggests that I add a reference to my DLL downloaded by nuget in my packages folder. Is that a valid approach? Or is it better to add it as a separate nuget package for the class library? If the latter approach is preferred, how do I know which version I should use?