This is a problem I've had for quite a long time, but because we're closing this project at work, I thought I might finally sort it out. When I check updates for our NuGet packages, the list always shows this (+ any actual available updates):
When I click update, the following screen shows up:
I can't select any checkboxes and as you can see, they are unchecked by default, which implies I don't have this package installed in our project. It doesn't matter whether I click OK or Cancel, it always goes back to the first screenshot. As you can see on screenshot 3, the package is not even listed in Installed list:
Neither is it in any packages.config file. When I write Uninstall-Package CommonServiceLocator, I get this:
PM> Uninstall-Package CommonServiceLocator
Uninstall-Package : Unable to find 'CommonServiceLocator' in 'ManagementSystem' and found multiple versions of 'CommonServiceLocator' installed. Please specify a version.
At line:1 char:18
+ Uninstall-Package <<<< CommonServiceLocator
+ CategoryInfo : NotSpecified: (:) [Uninstall-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.UninstallPackageCommand
I cannot specify a version, as there is none installed. I even tried manually adding the package into my packages.config file and then uninstalling it via the Installed list. Then I tried installing and uninstalling it in NuGet manager. Still the same. Has this ever happened to you? How did you solve it (except for recreating the whole project)? Thanks!
Found it out. If you use revision control, just delete the files from your HDD and check-out again. The package will then disappear.