I am cloning a solution to my local PC and Newtonsoft.Json is not working anymore. This was working till yesterday but today something seemed to have gotten corrupted and is not working anymore. If I try on another machine, it works. This is what I tried:
- Deleting reference, deleting from packages.config (both from solution and from project) but the nuget won't get removed as soon as I try to uninstall due to a CRC error
- Repairing visual studio 2019
- If I remove the package from both packages.config and from references, it is still listed under the packages
I don't know what else to try. The last option would be to uninstall VS, delete any data, and then re-install and re-setting everything up again but I would like to avoid this.
Any ideas?
Thanks.
CodePudding user response:
In some cases, the cached dependencies may be corrupted and they should be cleared from the NuGet cache, and/or the NuGet config should be reset.
NuGet cache and config are located at these locations:
C:\Users\User\.nuget\packages
C:\Users\User\AppData\Local\NuGet
C:\Users\User\AppData\Roaming\NuGet