Fernando Espinosa
Fernando Espinosa

Reputation: 4815

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

We’re using TeamCity 9.0.4. We’re using the integrated TeamCity NuGet feed as a package source for Visual Studio (both 2010 and 2013). We depend on it quite heavily for delivery of our libraries and dependencies.

Up until now, EVERYTHING WAS WORKING WELL. This is, until one of our solutions started using about 50 packages.

The Problem

  1. Every time we go to check for available updates to the packages installed in the solution (a.k.a, present in the \packages folder) in our TeamCity package source, we get

    HTTP/1.1 406 Not Acceptable

    responses from the service.

    enter image description here

  2. It doesn’t matter if we use the NuGet package manager GUI or the PowerShell console:

    enter image description here

  3. The problem occurs regardless of where TeamCity is installed. This is local installation of TeamCity:

    enter image description here

Diagnosis

All other features using this package source seem to work normally (list available packages, etc)

  1. Using Fiddler, I can see the kind of request sent to the feed service:

    enter image description here

  2. The WebView shows some description about the "error":

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

  3. Now, the moment that I delete (literally) 2 or 3 of the NuGet packages with the longest names from the \packages folders, the feed works again for available updates!

    enter image description here

  4. The request sent to the server looks different this time:

    enter image description here

What to do?

  1. All the things above lead me to believe that the problem is the way the package manager is trying to communicate with my TeamCity NuGet server for large payloads.

  2. From this link, it seems that there is this new API v2: TeamCity Documentation > What's New in TeamCity 9.0

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

  3. Is there something I can do on my TeamCity installation to make this work?!

Upvotes: 2

Views: 726

Answers (1)

Michal Adda
Michal Adda

Reputation: 113

Teamcity has this reported as bug: https://youtrack.jetbrains.com/issue/TW-39347

Recommended solution is switching back to v1 in config file teamcity.nuget.api.version=v1

Upvotes: 2

Related Questions