Newtonsoft.json: Unable to install 10.0.1/10.0.2 via NuGet

Created on 5 Apr 2017  路  3Comments  路  Source: JamesNK/Newtonsoft.Json

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

Most helpful comment

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

All 3 comments

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'.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TFTomSun picture TFTomSun  路  3Comments

sharwell picture sharwell  路  3Comments

QuantumDeveloper picture QuantumDeveloper  路  3Comments

ambs picture ambs  路  4Comments

Schwenkner picture Schwenkner  路  3Comments