Nuget 包管理器未在 Visual Studio 2019 中恢复包 [英] Nuget package manager not restoring packages in visual studio 2019

查看:94
本文介绍了Nuget 包管理器未在 Visual Studio 2019 中恢复包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我所有的办公室电脑都出现了一个奇怪的问题.我们无法访问 nuget.org,也无法在 Visual Studio 中使用 nuget 包管理器.发生错误.. 在这个问题上需要帮助..

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 包管理器无法在 Visual Studio 2019 中恢复包

Nuget package manager not restoring packages in visual studio 2019

请尝试以下步骤来解决您的问题:

Please try the following steps to troubleshoot your issue:

建议

1) 请尝试在网站上输入 https://www.nuget.org/api/v2/ 并检查它是否可以返回任何值和 确保您的互联网正常.

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.

  • 尝试关闭防火墙和任何杀毒软件

2) 在菜单扩展程序-->管理扩展程序下禁用任何第三方与扩展程序以消除扩展程序的干扰.

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

3)关闭VS,删除C:\Users\xxx(当前用户名)\AppData\Roaming\NuGet\NuGet.Config文件,然后重启VS重新生成全局 nuget.config 文件.

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) 或者您可以尝试使用此路径 http://packages.nuget.org/v1/FeedService.svc/ 作为 nuget.org.

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

5)请运行

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

包管理器控制台下(在工具下-->Nuget包管理器)

6) 尝试在 vs 中创建一个新项目以测试问题是否仍然存在.

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.

这篇关于Nuget 包管理器未在 Visual Studio 2019 中恢复包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆