Search code examples
json.netnugetvisual-studio-2019

Severity Code Description Project File Line Suppression State Error The package Newtonsoft.Json with version 12.0.3 could not be found in


I moved a project from one PC to another and compiling the solution I get the following

Severity Code Description Project File Line Suppression State Error The package Newtonsoft.Json with version 12.0.3 could not be found in C:\Users\Usuario.nuget\packages, C:\Microsoft\Xamarin\NuGet. Run a NuGet package restore to download the package. BusinessLogic

I have already restored it, deleted it, reinstalled it and it continues to appear, what I see is that the routes that tell me there in the error are not on the pc that I brought the project, in the previous one they are

¿but if this is how I can remove these routes or remove this error?


Solution

  • Please check these two options under Tools-->Options

    enter image description here

    Please enable them first. Then, click Clear Nuget Caches button.

    Also, please make sure that you have enabled nuget.org nuget pakage source https://api.nuget.org/v3/index.json.

    If not, please add it:

    enter image description here

    When you finish them all, close VS, delete .vs hidden folder under the solution folder, bin and obj folder.

    After that, restart your project and then click Rebuild button.