visual-studio - TeamCity NuGet 源 : Available updates not working in Visual Studio with list of packages sufficiently large (> 50)

标签 visual-studio nuget teamcity

我们正在使用 TeamCity 9.0.4。 我们使用集成的 TeamCity NuGet 源作为 Visual Studio(2010 和 2013)的包源。 我们非常依赖它来交付我们的库和依赖项。

到目前为止,一切都运行良好。直到我们的一个解决方案开始使用大约 50 个包。

问题

  1. 每次我们检查 TeamCity 软件包中解决方案(也称为,位于 \packages 文件夹中)中安装的软件包的可用更新时来源,我们得到

    HTTP/1.1 406 Not Acceptable

    来自服务的响应。

    enter image description here

  2. 我们使用 NuGet 包管理器 GUI 还是 PowerShell 控制台并不重要:

    enter image description here

  3. 无论 TeamCity 安装在何处,都会出现此问题。这是 TeamCity 的本地安装:

    enter image description here

诊断

使用此包源的所有其他功能似乎都可以正常工作(列出可用的包等)

  1. 使用 Fiddler,我可以查看发送到 Feed 服务的请求类型:

    enter image description here

  2. WebView 显示一些有关“错误”的描述:

    The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers

  3. 现在,当我从 \packages 文件夹中删除(字面意义上的)2 或 3 个名称最长的 NuGet 包时,提要会再次运行 获取可用更新!

    enter image description here

  4. 这次发送到服务器的请求看起来有所不同:

    enter image description here

做什么?

  1. 上述所有情况使我相信问题出在包管理器尝试与我的 TeamCity NuGet 服务器进行大型有效负载通信的方式。

  2. 从这个链接来看,似乎有这个新的 API v2: TeamCity Documentation > What's New in TeamCity 9.0

    NuGet feed supports API v2. The feed performance should be much better.

  3. 我可以在 TeamCity 安装上做些什么来使其正常工作吗?!

最佳答案

Teamcity 将此报告为错误: https://youtrack.jetbrains.com/issue/TW-39347

推荐的解决方案是在配置文件中切换回 v1 teamcity.nuget.api.version=v1

关于visual-studio - TeamCity NuGet 源 : Available updates not working in Visual Studio with list of packages sufficiently large (> 50),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31730036/

相关文章:

azure-devops - Azure DevOps 服务器上 NuGet 推送的“允许跳过重复项”警告和 409 错误

powershell - 从NuGet安装SignalR(Newtonsoft.Json的问题)

nuget - 找不到 Assets 文件project.assets.json。运行 NuGet 包还原

msbuild - TeamCity:管理验收测试的部署依赖关系?

java - 我如何报告测试结果并使用 maven/junit/spock 按功能编号对它们进行分组?

.net - Visual Studio "Start Debugging"与 "Attach to Process"

c# - 如何禁用 VS datagridview 中的第一个自动选择?

c# - String[].Count() 给出奇怪的结果

powershell - 获取版本 netCore csproj 文件 powershell

c# - DescriptionAttribute 与 <summary> 标签的属性