简体   繁体   中英

Nuget package manager not restoring packages in visual studio 2019

There is a strange problem going on in all of my office pcs. We are unable to access nuget.org and also we are unable to use the nuget package manager in visual studio. An error occured.. Need help in this issue..

Nuget package manager not restoring packages in visual studio 2019

Please try the following steps to troubleshoot your issue:

Suggestion

1) please try to enter https://www.nuget.org/api/v2/ on website and check if it can return any value and make sure that your Internet is ok.

  • try to turn off firewall, any anti-virus software

2) disable any third party vs extensions under menu Extensions --> Manage Extensions to eliminate interference from extensions.

3) close VS, delete C:\Users\xxx(current user name)\AppData\Roaming\NuGet\NuGet.Config file, and then restart VS to regenerate the global nuget.config file.

4) or you could try to use this path http://packages.nuget.org/v1/FeedService.svc/ as nuget.org .

5) please run

[Net.ServicePointManager]::SecurityProtocol=[Net.ServicePointManager]::SecurityProtocol-bOR [Net.SecurityProtocolType]::Tls12

under Package Manager Console (under Tools --> Nuget Package Manager )

6) try to create a new project in vs to test whether the issue still persists.

Besides , if I misunderstand your issue or if I miss some detailed info, please feel free to let us know which will helps us troubleshoot the issue quickly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM