Failed to add link to "Newtonsoft.Json"

I just installed Windows 8 on my computer and downloaded Microsoft Visual Studio Express 2012 for Windows 8. Everything is updated and when I try to install something through the Package Manager Console, I get the following error:

PM> Install-Package Parse Attempting to resolve dependency 'Newtonsoft.Json (β‰₯ 4.5.9)'. Successfully installed 'Newtonsoft.Json 4.5.11'. Successfully installed 'parse 1.0.5'. Successfully uninstalled 'Newtonsoft.Json 4.5.11'. Install failed. Rolling back... Install-Package : Failed to add reference to 'Newtonsoft.Json'. At line:1 char:1 + Install-Package Parse + ~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand 

Does anyone know how to fix this error?

Thanks Jack

+6
source share
2 answers

Make sure you already have the Newtonsoft.Json link added to packages.config. If so, delete the Newtonsoft.Json entry and install Install-Package.

+7
source

Sometimes just removing it from package.config may not be enough. I had to remove the Newtonsoft.Json directory from the packages directory, after which it worked.

+6
source

All Articles