I have two Nuget packages, let's call them A and B. Both reference a particular version of package C. I now need to update both packages A and B, but the problem is the updated versions both require the updated version C.
So, when I try to update package A, it tries to update package C, but can't because it would create a conflict with package B.
But when I try to update package B, I get the same issue, there's a conflict with package A due to the new version of package C!
I know that both packages could be updated to their very latest versions simultaneously using the GUI, but I can't use the latest versions - I need to use a specific older version. There doesn't seem to be an option to do this either in the GUI or in the console.
One option is to uninstall B and update A before re-installing B. But I've actually simplified the dependency graph significantly here and I don't want to have to go through uninstalling and reinstalling everything, every time I need to upgrade. For context, it's an Umbraco Cloud project where I need to upgrade one major version at a time.
Is there any other way of solving this issue?
In your situation, I'd avoid using the UI altogether and set the versions in code directly.
If you're using
<PackageReference>just find those items in the.csprojfile and edit theVersionattribute manually.If you're using
packages.configyou can just edit that file manually.VS will pick up your changes and kick off a restore in the background. Check the output panel (under "Package Manager") to see whether it succeeded.