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
相关推荐
宝桥南山5 天前
Visual Studio - 记录一个Visual Studio 2026(Insiders)的更新问题
windows·microsoft·微软·.net·.netcore·visual studio
郝学胜-神的一滴6 天前
Effective STL 条款 07:指针容器销毁前先删除
开发语言·c++·vscode·leetcode·rpc·visual studio
宝桥南山9 天前
Visual Studio 2026新特性 - 可以直接连接DeepSeek(使用Custom Endpoint Provider配置项)
ide·microsoft·微软·aigc·.net·visual studio
Risehuxyc9 天前
Visual Studio 2026 安装codebuddy的坑
visual studio
小七在进步9 天前
string的实现(3)
开发语言·c++·笔记·visual studio
H.莓飛10 天前
【C++】【STL】stack_OJ题
服务器·c语言·开发语言·数据结构·c++·算法·visual studio
Hhy_110710 天前
《C++深度解构07》手撕 vector —— 从底层三指针架构到迭代器失效彻底吃透
c语言·开发语言·c++·学习·visual studio
小七在进步12 天前
string的实现(1)
c++·笔记·visual studio
小七在进步17 天前
string的使用(1)
c++·visual studio
Hhy_110721 天前
《C++深度解构06》手撕 string —— 从底层内存管理到深浅拷贝彻底吃透
c语言·开发语言·c++·学习·visual studio