2

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): NuGet package manager updates

When I click update, the following screen shows up: Update

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: enter image description here

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!

Filip Vondrášek
  • 1,208
  • 1
  • 13
  • 26

3 Answers3

0

Found it out. If you use revision control, just delete the files from your HDD and check-out again. The package will then disappear.

Filip Vondrášek
  • 1,208
  • 1
  • 13
  • 26
0

I had the same issue in VS 2012. After I Updated it to Update 4 and tried again, it worked and ran without errors.

Peter T.
  • 8,757
  • 3
  • 34
  • 32
  • Judging from the date I asked the question, I probably already had had Update 4 installed, but it might help others who might not (for some reason) have it installed yet. – Filip Vondrášek Jun 01 '15 at 16:00
  • yeah I faced the problem and I didn't update VS to version 4. This solved my problem. It may help others. Thank you. – Peter T. Jun 01 '15 at 17:04
0

I had similar (not the same) issue with a package that had been updated, but still was coming up in avaliable updates list.

At least in VS 2013 Community Edition, it was enough to open Your\Solution\Path\packages in Windows Explorer and delete previous, already updated directories found in there. E.g. at some point I had:

packages\FluentAssertions.4.1.1
packages\FluentAssertions.4.9.0
packages\NSubstitute.1.8.2.0
packages\NSubstitute.1.10.0.0

and then I removed the two old ones. After that, launched Manage NuGet Packages for Solution and those items were gone from updates.

I came to this thread after a Google search, so maybe this answer can be useful for future comers as well. HTH

EDIT: this is basically the same issue/solution found here

Community
  • 1
  • 1
superjos
  • 12,189
  • 6
  • 89
  • 134