I have tried to install 10.0.1 and 10.0.2 in Visual Studio 2013 and 2015. Version 9.0.1 works just fine. 10.0.1 and 10.0.2 fail with the following error:
Output from NuGet Package Console
PM> Install-Package Newtonsoft.Json
Attempting to gather dependencies information for package 'Newtonsoft.Json.10.0.2' with respect to project 'ConsoleApplication1', targeting '.NETFramework,Version=v4.5.2'
Attempting to resolve dependencies for package 'Newtonsoft.Json.10.0.2' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Newtonsoft.Json.10.0.2'
Resolved actions to install package 'Newtonsoft.Json.10.0.2'
Install failed. Rolling back...
Package 'Newtonsoft.Json 10.0.2' does not exist in project 'ConsoleApplication1'
Package 'Newtonsoft.Json 10.0.2' does not exist in folder 'C:\Users\gudatcomputers\documents\visual studio 2015\Projects\ConsoleApplication1\packages'
Install-Package : An error occurred while downloading package 'Newtonsoft.Json 10.0.2' from source
'https://www.nuget.org/api/v2/'.At line:1 char:1
+ Install-Package Newtonsoft.Json
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackage
Command
That looks like an error on nuget.org
I suggest you raise it with them
For anyone having this issue, the problem is with the URL https://www.nuget.org/api/v2/
. Update your application to use https://api.nuget.org/v3/index.json
instead and it will install properly
If I replace https://www.nuget.org/api/v2/ with https://api.nuget.org/v3/index.json as you suggest I face another problem when I instal Umbraco, newtonsoft.json metadata throw error.
Error:An error occurred while retrieving package metadata for 'Newtonsoft.Json.10.0.3' from source 'c:\Users\navneet.kaur.defactoinfotech\documents\visual studio 2015\Projects\1\packages'.
Most helpful comment
For anyone having this issue, the problem is with the URL
https://www.nuget.org/api/v2/
. Update your application to usehttps://api.nuget.org/v3/index.json
instead and it will install properly