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 天前
【C++】string(string的成员变量、auto和范围for、string常用接口的说明、OJ题目、string的模拟实现)
c语言·开发语言·c++·visual studio
C++ 老炮儿的技术栈5 天前
Ubuntu root账号自动登陆
linux·运维·服务器·c语言·c++·ubuntu·visual studio
A.零点5 天前
【2个月 C 语言从入门到精通:零基础系统教程】第十二讲:深入了解指针(五)
c语言·开发语言·网络·笔记·visual studio
彷徨而立5 天前
【VS2026】介绍 Visual Studio 几个重要配置项
visual studio
AndyHuang19766 天前
【避坑指南】Visual Studio 插件报错 “Windows Terminal (wt.exe) was not found in PATH“ 完美解决
ide·windows·visual studio
彷徨而立6 天前
【Visual Studio】msbuild 使用举例
ide·visual studio
blueman88886 天前
VS2022 切换定义(F12 / Go to Definition)反应慢
c++·visual studio
周杰伦fans6 天前
记一次 Visual Studio 突然报错“未能加载 Microsoft.Internal.VisualStudio.Interop”的奇葩经历
microsoft·log4j·visual studio
x138702859577 天前
c语言中srtlen(指针使用计算字符长度)、传值和传址调用
c语言·开发语言·算法·visual studio
robot_???9 天前
Visual studio2022:找不到指定的SDK“Microsoft.NET.Sdk”
microsoft·.net·visual studio