Visual Studio中怎样更改Nuget程序包源

场景

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

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

将程序包源修改下。

实现

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

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

常见 NuGet 包源的网址包括:

https://api.nuget.org/v3/index.json(默认的 NuGet 包源)

https://www.nuget.org/api/v2/ (老版本 NuGet 包源)

https://packages.nuget.org/api/v2/ (老版本 NuGet 包源)

https://nuget.smbsrc.net/smbsrc.net NuGet 包源)

https://www.myget.org/F/xamarin-android/api/v2/ (Xamarin.Android 包源)

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

cs 复制代码
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
相关推荐
晨非辰41 分钟前
#C语言——刷题攻略:牛客编程入门训练(十):攻克 循环控制(二),轻松拿捏!
c语言·开发语言·经验分享·学习·visual studio
平平无奇。。。4 小时前
解密完全二叉树顺序存储之堆结构
c语言·数据结构·visual studio
晨非辰7 小时前
#C语言——刷题攻略:牛客编程入门训练(十二):攻克 循环控制(四)、循环输出图形(一),轻松拿捏!
c语言·开发语言·经验分享·笔记·其他·学习方法·visual studio
MeteorSeed12 小时前
【译】Visual Studio 八月更新已发布 —— 更智能的人工智能、更出色的调试功能以及更多控制权
visual studio
许怀楠17 小时前
【主页介绍】
linux·c++·贪心算法·visual studio
.NET修仙日记1 天前
Visual Studio 2026 震撼发布!AI 智能编程时代正式来临
ide·微软·ai编程·开发工具·visual studio·编程革命
阿洛学长1 天前
Visual Studio下载安装教程及其旧版本
ide·visual studio
晨非辰2 天前
#C语言——刷题攻略:牛客编程入门训练(十一):攻克 循环控制(三),轻松拿捏!
c语言·开发语言·经验分享·学习·visual studio
lichong9512 天前
API开发工具postman、国内xxapi和SmartApi的性能对比
eclipse·intellij-idea·api·postman·visual studio·apipost·apifox