C
C#•4d ago
madmike

Add NuGet package to shared library not possible (Rider)

In general, it should be possible to install NuGet packages in a shared library, right? 🥴 I have a weird sln. I have 2 projects in my solution, 1 App project that depends on 1 Shared Library project. I can only install NuGet packages in the App project, and for some reason the namespaces become available in the Shared Project then as well. If I try to add the NuGet package to the Shared Project, Rider simply opens a dialog to confirm and then does nothing. See also the screenshot. Dependencies -> .NET 8.0 is missing from the BitGame.Core project where packages would usually show up. Maybe the .csproj file needs fixing?
No description
5 Replies
ero
ero•4d ago
Show the project files. Also which one of these is the "shared" project?
Sehra
Sehra•4d ago
a shared project doesn't have references. maybe you want to make a class library instead?
ero
ero•4d ago
What does a shared project entail here? Maybe I'm not understanding Wow yeah I've never heard of that But makes a lot of sense why they can't reference nuget packages then
madmike
madmikeOP•4d ago
I've never heard of that either, I thought this is a class library that compiles to a .dll that explains why the project file is .shproj which I've never seen before either lol MonoGame template ... Thanks a lot for your help, I will have to create a new actual class library project and copy the code
Anton
Anton•4d ago
look at the csproj files

Did you find this page helpful?