Nuget Restore fails first time build is ran

We have hit an issue where we have to rerun our build multiple times to get it to succeed in teamcity. It never fails outside of it. The issue is that during the Nuget restore step it 'fails to download' a file. We look at the public https://www.nuget.org/api/v2/ nuget location and a private nuget server our company hosts internally the server has access to over the network. The issue is the build log will say it failed to download the package (it does not appear to be consistent which private nuget it fails on) from https://www.nuget.org/api/v2/  when the package is hosted instead on the private nuget server.

It obviously has access as on rebuilding the project it almost always builds if the project is rebuilt 2-3 times. I dont' see a way I can possibly configure this.

https://www.nuget.org/api/v2/
http://okc1nuget-1/api/v2

This is how I put in the packages in the packages sources box. Any ideas/help would be much appreciated.

Example Error Message:

[13:13:04][restore] Error downloading 'CnetSDK.PDFtoImage.Converter.x86.17.5.0.1' from 'https://www.nuget.org/api/v2/'.
[13:13:04][restore] The read operation failed, see inner exception.
[13:13:04][restore] The request was aborted: The request was canceled.

...

[13:13:20][restore] Errors in packages.config projects
[13:13:19][restore] Error downloading 'CnetSDK.PDFtoImage.Converter.x86.17.5.0.1' from 'https://www.nuget.org/api/v2/'.
[13:13:19][restore] The read operation failed, see inner exception.
[13:13:19][restore] The request was aborted: The request was canceled.
[13:13:19][restore]
[13:13:19][restore] NuGet Config files used:
[13:13:19][restore] C:\Users\TeamCityDeploy\AppData\Roaming\NuGet\NuGet.Config
[13:13:19][restore]
[13:13:19][restore] Feeds used:
[13:13:19][restore] C:\Users\TeamCityDeploy\AppData\Local\NuGet\Cache
[13:13:19][restore] C:\Users\TeamCityDeploy\.nuget\packages\
[13:13:19][restore] https://www.nuget.org/api/v2/
[13:13:19][restore] http://okc1nuget-1/api/v2
[13:13:20][restore]

 

0
1 comment

Hi,

 

the exceptions would be most useful. In particular, given that it only happens in teamcity, please follow the troubleshooting steps here: https://www.jetbrains.com/help/teamcity/common-problems.html#CommonProblems-BuildworkslocallybutfailsormisbehavesinTeamCity

 

Gather the information requested there and forward it to us as mentioned in the article.

0

Please sign in to leave a comment.