Let's say that I have 2 class libraries.
I have included a NuGet package in project A. I need to instantiate classes from that package in project B.
Should I simply add references to the package by browsing from project A and point out the dll? Or is there another option?
You can add the same NuGet package in project B and use it.
Package manager in Visual Studio creates a directory inside your SoutionDir called "packages", it contains all NuGet dlls from all projects. So it does not download it 2 times...
If you need classes from a package, add the package reference in project B through Nuget Package.
If you just need the classes from project A in project B, then add reference to project A from project B.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.