Uploaded image for project: 'TeamCity Artifactory Plug-in'
  1. TeamCity Artifactory Plug-in
  2. TCAP-186

Request of NuGet package returns first package in repository, regardless of package or version requested

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 4 - Normal
    • Resolution: Not a Bug
    • Affects Version/s: 2.1.4
    • Fix Version/s: None
    • Environment:

      Windows 7

      Description

      I have a repository called myproject-dotnet, created with the "nuget-default" layout. I have loaded the following NuGet packages into the repository:

      BeautifulApp-0.5.0.0
      BeautifulApp-0.5.0.3
      BeautifulApp-0.5.0.6

      In my application, my packages.config file defines a dependency to BeautifulApp-0.5.0.6

      <package id="BeautifulApp" version="0.5.0.6" targetFramework="net45" />

      I can get the dependency correctly using the Package Manager Console in Visual Studio.

      However, when I try to build the application with TeamCity, I see the following error messages:

      [12:25:34][install] JetBrains TeamCity NuGet Runner 8.0.27616.9
      [12:25:34][install] Registered additional extensions from paths: C:\TeamCity\buildAgent\plugins\nuget-agent\bin\plugins-2.5
      [12:25:34][install] Starting NuGet.exe 2.7.40906.75 from C:\TeamCity\buildAgent\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe
      [12:25:37][install] 'BeautifulApp 0.5.0.0' already installed.
      [12:25:37][install] All packages listed in packages.config are already installed.

      While troubleshooting, I add a package to the Artifactory repository named AmazingLibrary-1.0.0.0

      To my surprise, I begin seeing the following in my build logs:

      [12:25:34][install] JetBrains TeamCity NuGet Runner 8.0.27616.9
      [12:25:34][install] Registered additional extensions from paths: C:\TeamCity\buildAgent\plugins\nuget-agent\bin\plugins-2.5
      [12:25:34][install] Starting NuGet.exe 2.7.40906.75 from C:\TeamCity\buildAgent\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe
      [12:25:37][install] 'AmazingLib 1.0.0.0' already installed.
      [12:25:37][install] All packages listed in packages.config are already installed.

      It appears that Artifactory is serving me the first alphabetical package in the repository, regardless of the package I request! Of course, this makes Artifactory useless as a NuGet repository.

      If I build a project with NuGet package dependencies stored in Microsoft's public NuGet repository, the build behaves as expected, which is why I believe this to be an Artifactory issue.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            neontapir Chuck Durfee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: