C#C
C#3y ago
3 replies
Blaze987

❔ Missing assembly reference using PackageReference

I updated to package references a short while ago, now when I change development environments (git clone on a new PC), I get: "The type or namespace name 'packageB' could not be found (are you missing a using directive or an assembly reference?)".

I'm new to using packageReference so I think I'm missing something straight forward. I've tried copying the dlls to the old packages folder in the solution directory, which works sometimes, but isn't right now. Below are things that have happened to me in the past and I've checked to ensure that isn't happening this time.

I've stumbled across this bug in Rider: https://youtrack.jetbrains.com/issue/RIDER-28484/The-type-or-namespace-could-not-be-found-error-after-pulling-a-project-with-changed-NuGet-dependencies.

Delete, Reinstall, check paths, check versions, etc... : https://stackoverflow.com/questions/31663511/nuget-package-installed-but-references-not-resolved (Update-Package -reinstall only works in VS, and I use Rider which doesn't support it... Even tried downloading VS22 and that fixed it once)

https://stackoverflow.com/questions/65816573/some-project-in-a-solution-is-unable-to-find-system-references-to-nuget-packages - I think this is my solution here, but I have not seen any of these hint-paths before. I don't know where they should point. Nothing I try will generate them. I'm okay with writing them if I knew where but the MS docs isn't very clear on this. Most sites that mention it say that it should be automatically generated...

https://duanenewman.net/blog/post/a-better-way-to-override-references-with-packagereference/ - I can't tell where this variable is pointing to from this blog. Is this way of declaring the packagereference what I'm looking for?


Thanks, and I appreciate any help. I'm at my wits end with nuget packages at this point... I feel I spend more time dealing with this than writing code...
Screenshot_2023-06-19_213252.png
Stack Overflow
I have a multi-project solution with Prism Nuget packages installed in several projects. I then attempted to add a Prism Mef extensions package to one of the projects using the Nuget Package Manage...
Nuget package installed but references not resolved
Stack Overflow
This is a project that's being cloned from Git, my references are all showing that it could not be found, even though some of it is built in system reference. This solution was cloned from a Git
Some Project in a solution is unable to find System references to N...
Was this page helpful?