6
votes

Up to now we've been using Azure VM's for building our application. Because of legal requirements we were instructed to move these activities to an on-prem server which resides behind a proxy. Now I see the builds are failing with the following log message:

##[error]getaddrinfo ENOTFOUND dist.nuget.org dist.nuget.org:443

So I am assuming this might be due to the nuget proxy config. So I've tried adding a nuget.config file with the correct proxy settings and checking that one in to the solution, but that didn't change anything. Also tried downloading the CLI and setting the nuget proxy config setting, but again to no avail.

The weird thing is; when I run the command locally from cmd, it all works fine!? So I must be missing something here, but what?

1
I'm sending this to our packaging team.bryanmac
Awesome, thanks Brian!Jasper
Since it works from the cli (logged on as you), is the agent running as your account or network service? Maybe try setting up another agent on the box SxS in another folder (download fresh one) and have it run as your account. Queue a build demanding that agent.name. See if that worksbryanmac
Running with the same account as I tried CLI with.Jasper
Could you post the detail build log here or share it on the OneDrive?starian chen-MSFT

1 Answers

5
votes

@Jasper, Hi, I'm Keith and I work on the packaging team at MSFT.

It looks like you may be using the nuget tool installer to fetch nuget before running a build task. Can you confirm that this is the case? If this is your situation there is a known problem with the tool installer not respecting the proxy settings of the build agent that is being fixed.

Also, you should not need to set proxy settings in your nuget.config. You should set them in the build agent via this method. The v2.* version of the nuget build task will discover the agent's proxy settings and use them when appropriate (e.g. restore).