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
相关推荐
脚踏实地皮皮晨1 小时前
003003002_WPF Grid 基类官方类定义逐行深度解析
开发语言·windows·算法·c#·wpf·visual studio
zyl8372116 小时前
MCP CodeGraph 完整介绍
visual studio
脚踏实地皮皮晨18 小时前
002002002_DepandencyObject类2
开发语言·windows·算法·c#·visual studio
仙宇觉尘1 天前
【译】Visual Studio Copilot 中更智能的人工智能编辑
人工智能·copilot·visual studio
计算机内卷的N天1 天前
CMake与Visual Studio的使用
c++·ide·visual studio
脚踏实地皮皮晨1 天前
003002004_WPF Panel 基类 官方类定义
开发语言·windows·算法·c#·wpf·visual studio
咱入行浅1 天前
一款实用的 Visual Studio 发布部署插件,助力提高部署效率!
ide·visual studio
呐抹倾2 天前
【译】Visual Studio 停用:针对旧版本 Visual Studio 的支持提醒
ide·visual studio
Listen·Rain3 天前
用AI开发出一个AI
java·人工智能·spring boot·tomcat·intellij-idea·mybatis·visual studio
△曉風殘月〆4 天前
如何在Visual Studio 2026中配置Qt 6.1开发环境
ide·visual studio