我在包发布中心 (VSTS) 中创建了一个新的源,安装了凭据,然后添加了包源。
现在,我使用 Visual Studio 2015 将 Micrososft.Aspnet.mvc 安装到项目中,但出现以下错误:
Exception 'System.AggregateException' thrown when trying to add source
'https://mysite.pkgs.visualstudio.com/DefaultCollection/_packaging/MyLogUtils/nuget/v3/index.json'.
Please verify all your online package sources are available.
我需要正常安装 NuGet 包,因此我从 VSTS 中删除了 feed。然而,问题仍然存在。这个问题如何解决?
因为这是我遇到问题的第一页:
如果您收到 nuget.org 站点的错误,请增加版本号:
https://api.nuget.org/v3/index.json -> https://api.nuget.org/v4/index.json
在“工具”->“选项”->“Nuget 包管理器”下(请参阅来自 @Eddie-MSFT 的图片)
V3从今天开始好像就不能用了。
我遇到了同样的问题,我通过禁用其自定义 nuget 服务器解决了它。
当 NuGet.Config 文件为只读时,可能会出现此异常,对我来说,取消选中该文件的 reaonly 属性是有效的,通常,Nuget.config 文件存在于项目中的 .nuget 文件夹下。
文件路径项目目录/.nuget/NuGet.Config
您必须确保所有配置的包源服务器都可用。否则,只需转到 Tools->Options->Nuget Package Manager 并禁用自定义 NuGet 服务器。
'System.AggregateException' thrown when trying to add source 'https://devops.MyCompany.com/MC/_packaging/SharedFunctionalist/nuget/v3/index.json'. Please verify all your online package sources are available. One or more errors occurred.
Unable to load the service index for source https://devops.MyCompany.com/MC/_packaging/SharedFunctionalist/nuget/v3/index.json. Response status code does not indicate success: 401 (Unauthorized).
我今天遇到了同样的问题。如果您注意到它可能会要求您输入 DevOps 凭据。这意味着它要求您登录您的 DevOps 帐户。
此类问题有两种选择
1.使用您的凭据登录 DevOps 帐户(您的团队帐户)。然后您可以像往常一样安装 Nuget 软件包。
2.否则你必须按照以下步骤删除现有的包包源(与团队共享)。
`打开 Visual Studio -> 工具 -> 选项 -> Nuget Package Manager -> Package Sources -> 选择该共享包源并将其删除
转到 Tools->Options->Nuget Package Manager->Package Sources 并取消选中名为 nuget.org https://api.nuget.org/v3/index.json 的在线 NuGet 源。另请确保检查您的离线来源
我也有同样的问题。我通过从工具/选项/Nuget包管理器/包源中删除复选标记解决了这个问题。
对我来说,引发错误的包没有显示在 NuGet 源列表中(这是一个错误吗?)。
我必须通过 CLI(终端)并输入
nuget sources
获取 Nuget 源列表。
一旦列出导致问题的来源,我就可以将其删除(您也可以禁用它)
nuget sources Remove -Name "source"
之后,重新启动Visual Studio
要解决此问题,请转到“设置”->“NuGet”->“源”。删除所有未使用的 NuGet 源,包括私有 NuGet 源。重新启动 Visual Studio,它应该可以解决问题。