An error occurred while downloading package 'Newtonsoft.Json.10.0.2 :
See original GitHub issueVisual studio 2015 - New Asp.net web application. framework 4.5.2 Its a brand new project nothing in it besides the stranded code VS adds to the project.
Import package Install-Package Google.Apis.AnalyticsReporting.v4 or Install-Package Google.Apis.AnalyticsReporting.v4 -Version 1.27.1.881
Results in error
PM> Install-Package Google.Apis.AnalyticsReporting.v4 -Version 1.27.1.881 Attempting to gather dependencies information for package ‘Google.Apis.AnalyticsReporting.v4.1.27.1.881’ with respect to project ‘GoogleAuthWebTest’, targeting ‘.NETFramework,Version=v4.5.2’ Attempting to resolve dependencies for package ‘Google.Apis.AnalyticsReporting.v4.1.27.1.881’ with DependencyBehavior ‘Lowest’ Resolving actions to install package ‘Google.Apis.AnalyticsReporting.v4.1.27.1.881’ Resolved actions to install package ‘Google.Apis.AnalyticsReporting.v4.1.27.1.881’ Removed package ‘Newtonsoft.Json.6.0.4’ from ‘packages.config’ Successfully uninstalled ‘Newtonsoft.Json.6.0.4’ from GoogleAuthWebTest Install failed. Rolling back… Package 'Newtonsoft.Json.10.0.2 : ’ does not exist in project ‘GoogleAuthWebTest’ Package ‘Newtonsoft.Json.6.0.4’ already exists in folder ‘C:\Users\HP_User\documents\visual studio 2015\Projects\GoogleAuthWebTest\packages’ Added package ‘Newtonsoft.Json.6.0.4’ to ‘packages.config’ Executing script file ‘C:\Users\HP_User\documents\visual studio 2015\Projects\GoogleAuthWebTest\packages\Newtonsoft.Json.6.0.4\tools\install.ps1’ Package 'Newtonsoft.Json.10.0.2 : ’ does not exist in folder ‘C:\Users\HP_User\documents\visual studio 2015\Projects\GoogleAuthWebTest\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
Note: I can see it removing Json and then adding it again then it rolls everything back.
Update:
This one works Install-Package Google.Apis.AnalyticsReporting.v4 -Version 1.25.0.847
everything after that results in an error. Same thing on just a console application so it has nothing to do with the project type.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9
Top GitHub Comments
Found this elsewhere: “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”. https://github.com/JamesNK/Newtonsoft.Json/issues/1274
to Resolve this issue you need to Update Nuget Package Manger. To update Nuget Package Manager Please Go to Tools => Updates and update Nuget Package Manger.