0
点赞
收藏
分享

微信扫一扫

鸿蒙官网学习3

黄昏孤酒 2024-04-28 阅读 7

场景

Visual  Studio 2019 在使用NuGet添加依赖包时,在预览中搜索不到程序包。

排查下NuGet的程序包源为本地。

将程序包源修改下。

实现

在解决方案上右击选择管理解决方案中的NuGet程序包(在 Visual Studio 中打开“工具”>“选项”>“NuGet 包管理器”>“程序包源”选项卡)

然后在页面的右上角有个程序包源,点击右边的设置按钮图标 、(1.在“程序包源”列表中选择要修改的包源。2.单击“编辑”按钮,将“源”字段中的网址更改为新的 NuGet 包源网址)

原来的程序包源为本地,我这里将其修改为  

https://www.nuget.org/api/v2/

以上包源下载速度比较慢,建议更换以下包源。
(https://blog.csdn.net/caoyanchao1/article/details/138249493?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22138249493%22%2C%22source%22%3A%22caoyanchao1%22%7D)

NuGet 官方源: https://api.nuget.org/v3/index.json

举报

相关推荐

0 条评论