7
votes

I want to restore my Identity Server 4 project, after open VS2017 but when package manager try to restore references, it gets fail error every time.

I use latest version of VS2017 and my core packages installed and updated on my pc.

Error The feed 'nuget.org [https://api.nuget.org/v3/index.json]' lists package 'Microsoft.AspNetCore.2.1.3' but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again. Unable to find package 'Microsoft.AspNetCore.2.1.3'.

enter image description here

2
Where did you meet this issue, VSTS or local?Leo Liu-MSFT
VSTS project. Download to source code from TFS and try to first restore, then crash.Ugur Ozker
Thanks for your reply. You mean that you pull the project from TFS to the local and restore it on local, and then get this error? If yes, have you use Manager nuget packages UI to check if you can find that package? And if you can open the source '[api.nuget.org/v3/index.json]' in the browser directly?Leo Liu-MSFT
Yes i can open directly this latest packages source url and another v2 old one. I use Nuget Packages Manager UI and get same error again. Can i found nuget event logs or detailed exception log anywhere, is it possible ?Ugur Ozker
i added detailed error screenshot main part of the question. you can see it.Ugur Ozker

2 Answers

8
votes

end of central directory record could not be found

According to the message in the error log "end of central directory record could not be found", you can try following troubleshootings to resolve this issue:

  • Clean all the NuGet package cache by the command line: nuget locals all -clear.
  • Close all Visual Studio instance, then delete nuget.config file in the location: C:\Users\leoliu\AppData\Roaming\NuGet\NuGet.Config, then re-open the Visual Studio to restore nuget packages.
  • Check if there is a firewall policy or other proxy settings that block the nuget installation package.

Hope this helps.

0
votes

Did you try it by Manage NuGet Packages ?

1) Remove IdentityServer4 from Dependencies

2) Open Manage NuGet Packages

3) Browse IdentityServer4 again and install it

enter image description here