NuGet asks to restore unneeded package, unable to find package reference

120 Views Asked by At

In Visual Studio 2012 with the NuGet Package Manager, NuGet prompts to restore version 9.0.1 of the package Json.NET. When I click the Restore button, the restore fails. This occurs even after removing Json.NET from every project in my solution.

The below screenshot shows that Json.NET is no longer installed locally, and that the requested package restore fails.

enter image description here

I would like to figure out why NuGet still thinks it needs this package, even though it's no longer referenced in any projects. I have even searched the contents of the .csproj files for the projects for references to the Newtonsoft.Json assembly, but there are none.

Update and answer:

Jeff Block's post below was the answer. There is a packages.config file for the solution. I thought I had deleted it through Visual Studio, but it had only been removed from the Solution Explorer. Deleting the file on the file system stopped NuGet from looking for that package.

1

There are 1 best solutions below

1
On BEST ANSWER

Is the package being included from $(SolutionDir).nuget\packages.config or a 'solution level' configuration file?

Sorry for answering with a question, I apparently cannot make a comment on your question until I have earned reputation.