C
C#4mo ago
Core

✅ Should NuGet package be installed both in the main project and class library?

Hello, A NuGet package exposes some interfaces which I would like to implement, but the library also needs configuration, which must happen in Program.cs. Should I only install the NuGet package in the class library and reference it in the main project, or install it in each project?
7 Replies
Becquerel
Becquerel4mo ago
if you install it in the class library, the package will be transitively available in the main project assuming the main project references the class library
Core
CoreOP4mo ago
Yes, it's MassTransit configuration
Becquerel
Becquerel4mo ago
that's what i do for MT yeah i install the actual package in the MyApp.Core project which MyApp.UI references and in program.cs i do the setup there
Core
CoreOP4mo ago
And you also install the queue library of your choice in the Core project as well? (e.g. MassTransit.RabbitMq)
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Core
CoreOP4mo ago
Got it, thanks $close
MODiX
MODiX4mo ago
If you have no further questions, please use /close to mark the forum thread as answered
Want results from more Discord servers?
Add your server