Nuget Restore via build server "unable to find version"

Chris Kooken

I have a VS solution and as part of a TeamCity Build, we restore packages from both a private NuGet feed (myget) and the public feed (nuget.org). Most packages restore fine, but it hangs on the ones below for WebApi and Mono.Security. This is all working locally in Visual Studio.

[restore] NuGet command: C:\TeamCity\buildAgent\plugins\nuget-agent\bin\JetBrains.TeamCity.NuGetRunner.exe C:\TeamCity\buildAgent\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe restore C:\TeamCity\buildAgent\work\953bd084b49f7d88\DataFinch.Web.sln -Source https://www.myget.org/F/datafinch/auth/<hidden>/api/v2 -Source https://api.nuget.org/v3/index.json
[11:41:35][restore] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script473789219385667038.cmd
[11:41:35][restore] in directory: C:\TeamCity\buildAgent\work\953bd084b49f7d88
[11:41:35][restore] JetBrains TeamCity NuGet Runner 8.0.37059.9
[11:41:35][restore] Registered additional extensions from paths: C:\TeamCity\buildAgent\plugins\nuget-agent\bin\plugins-2.8
[11:41:35][restore] Starting NuGet.exe 2.8.50926.602 from C:\TeamCity\buildAgent\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe
[11:41:43][restore] Unable to find version '5.2.3' of package 'Microsoft.AspNet.WebApi.Client'.
[11:41:43][restore] Unable to find version '5.2.3' of package 'Microsoft.AspNet.WebApi.Core'.
[11:41:43][restore] Unable to find version '3.2.3.0' of package 'Mono.Security'.
[11:41:43][restore] Unable to find version '6.0.4' of package 'Newtonsoft.Json'.
[11:41:43][restore] Process exited with code 1

Teamcity config: enter image description here

rarrarrarrr

Try using https://www.nuget.org/api/v2instead of https://api.nuget.org/v3/index.json per the nuget docs: https://docs.nuget.org/consume/Command-Line-Reference.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

NuGet unable to find the version of a package

Storing nuget packages in alternate location on build server

How to get TFS2015 Build (Build.vnext) and NuGet package restore to use custom package sources

TFS 2013 Build Controller Not Respecting NuGet Package Restore

"Unable to find version" during TFS Build 2015 when restoring NuGet packages

TFS 2015 Build: NuGet restore from an internal repository

NuGet Package restore failed for project PROJECT: Unable to find version 2.0.0 of package 'Microsoft.Net.Compilers'

.NET Core NuGet restore fails with private NuGet feed (VSTS CI Build)

Nuget restore fails for ASP.NET Core 2.0 project on build server

MSBuild 15 NuGet restore and build

VSTS Build Definition : adding multiple feeds in Nuget restore task

Nuget package restore error in Docker Compose build

Nuget restore version conflict build error on VSTS

NuGet install-package error (unable to find version that is compatible)

Nuget restores packages differently on build server

VSO Build Pipeline's Nuget Restore Failed

Azure DevOps Server pipeline build fails when using self-signed SSL certificate with "unable to get local issuer certificate" during NuGet restore

NuGet package restore in Azure DevOps build pipeline

Problem with "nuget restore" with some lib's in build azure Pipeline

Azure build pipeline NuGet Restore error NETSDK1045

How to use an API Key with dotnet restore with private NuGet server

NuGet Package restore failed for project myProjectWeb: Unable to find version '3.0.1' of package 'AppForSharePoint16WebToolkit'

EXEC: Unable to connect to the remote server on NuGet restore on TFS build server

NuGet.targets (100): Unable to find version '4.0.20710.0' of package

Nuget package restore error in build definition

Restore NuGet Package in TeamCity Build and Deploy Step

TeamCity Build Server cannot restore nuget packages

How does Nuget Restore task work? Does nuget.config in the solution have to match that of in the build server?

Azure Devops private build agent failing at nuget restore task