Using AzureDevOps I should be able to restore packages from the feeds hosted within AzureDevOps. The Nuget.config seems correct, the build has access to the feed, locally it runs fine with explicitly using the same config file.
I've seen VSTS Build vNext NuGet custom package source but would very much like to stay out of adding apikey's there. The official documentation states it should be possible: https://www.visualstudio.com/docs/package/get-started/build/team-build
NuGet.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Net2Library" value="https://xxx.pkgs.visualstudio.com/DefaultCollection/_packaging/yyy/nuget/v3/index.json" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
</configuration>
Restore settings (it uses the correct config, visible from listing the feed in the logs)
Relevant logs:
2016-07-30T12:33:37.8085538Z Restoring NuGet package XYZ.2016.7.29.14.
2016-07-30T12:33:42.6885539Z Unable to find version '2016.7.29.14' of package 'XYZ'.
2016-07-30T12:33:42.6915543Z Feeds used:
2016-07-30T12:33:42.6925542Z C:\Users\buildguest\AppData\Local\NuGet\Cache
2016-07-30T12:33:42.6925542Z C:\Users\buildguest\.nuget\packages\
2016-07-30T12:33:42.6925542Z https://api.nuget.org/v3/index.json
2016-07-30T12:33:42.6935552Z https://xxx.pkgs.visualstudio.com/DefaultCollection/_packaging/yyy/nuget/v3/index.json
2016-07-30T12:33:42.7235541Z ##[debug]rc:1
2016-07-30T12:33:42.7245545Z ##[debug]success:false
2016-07-30T12:33:42.7325527Z ##[error]Error: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\1.103.1\agent\Worker\Tools\nuget.exe failed with return code: 1
2016-07-30T12:33:42.7335525Z ##[error]Packages failed to install
2016-07-30T12:33:42.7335525Z ##[debug]task result: Failed
2016-07-30T12:33:42.7345538Z ##[error]Return code: 1