Azure-pipelines-tasks: Warning in NuGet-task (push only): "No package sources were found in the NuGet.config file at D:\a\3\Nuget\tempNuGet_xxxx.config"

Created on 13 Jun 2018  路  9Comments  路  Source: microsoft/azure-pipelines-tasks

We have a NuGet task configured for pushing which raisea a warning that the package source was not found in the NuGet.config (created by the NuGet-task itself).

The warning is incorrect, because the package source is defined explicitly in the configuration page of the task (Target feed setting).

Log:

2018-06-08T12:22:10.6372630Z ##[section]Starting: NuGet push
2018-06-08T12:22:10.6378755Z ==============================================================================
2018-06-08T12:22:10.6378956Z Task : NuGet
2018-06-08T12:22:10.6379198Z Description : Restore, pack, or push NuGet packages, or run a NuGet command. Supports NuGet.org and authenticated feeds like Package Management and MyGet. Uses NuGet.exe and works with .NET Framework apps. For .NET Core and .NET Standard apps, use the .NET Core task.
2018-06-08T12:22:10.6379605Z Version : 2.0.27
2018-06-08T12:22:10.6379880Z Author : Microsoft Corporation
2018-06-08T12:22:10.6380189Z Help : More Information
2018-06-08T12:22:10.6380568Z ==============================================================================
2018-06-08T12:22:11.1877357Z [command]C:\Windows\system32\chcp.com 65001
2018-06-08T12:22:11.1877553Z Active code page: 65001
2018-06-08T12:22:11.1880815Z SYSTEMVSSCONNECTION exists true
2018-06-08T12:22:11.1999230Z Detected NuGet version 4.6.0.4971 / 4.6.0-rtm-4971
2018-06-08T12:22:11.5342264Z Saving NuGet.config to a temporary config file.
2018-06-08T12:22:11.5399605Z ##[warning]No package sources were found in the NuGet.config file at D:\a\3\Nuget\tempNuGet_2609.config
2018-06-08T12:22:11.5428255Z [command]D:\a_tasks\NuGetCommand_333b11bd-d341-40d9-afcf-b32d5ce6f23b\2.0.27\VstsNuGetPush\0.13.0\VstsNuGetPush.exe D:\a\3\axxxx.nupkg -Source https://xxxx.pkgs.visualstudio.com/_packaging/xxxx/nuget/v3/index.json -AccessToken * -NonInteractive -Verbosity Detailed
2018-06-08T12:22:17.7884842Z Trying to authenticate with auth token.
2018-06-08T12:22:17.7885465Z Successfully authenticated.
2018-06-08T12:22:17.7885641Z Authentication and request took 00:00:01.9139111
2018-06-08T12:22:17.7886118Z Adding package Txxxx.nupkg to feed xxxx on https://xxxx.pkgs.visualstudio.com/.
2018-06-08T12:22:17.7886633Z Trying to add package to feed without uploading.
2018-06-08T12:22:17.7886809Z Adding package to feed.
2018-06-08T12:22:17.7886950Z The package content is not already on the service.
2018-06-08T12:22:17.7887085Z Uploading package content.
2018-06-08T12:22:17.7887229Z Done uploading package content.
2018-06-08T12:22:17.7887355Z Adding package to feed.
2018-06-08T12:22:17.7887483Z Successfully added package to feed.
2018-06-08T12:22:17.8089039Z ##[section]Finishing: NuGet push

ArtifactsPackages

Most helpful comment

The warning is there for us. We have .nuget/Nuget.config in our solution folder. But Nuget seems to be using the source ok... I don't know why the warning is there in our case.

All 9 comments

Did you find a resolution for this issue? I am seeing the same thing.

Not at the time, we have put this issue on our backlog. If you or anyone else found a resolution it would be very nice to hear this.

I just had the same issue with in one of our Azure DevOps build pipeline which is a clone of one which already worked. I solved it just by adding a entry to the .Nuget.config.

It actually also had the effect that the Nuget restore build step didn't find the reference packages even while there are present.

Hi AKarnetzki,
I have the same issue. I am new to azure devops.
Could you please add a bit more detail of how you solved it?
How can I add an entry to NuGet.config?

We have Nuget.config checked in to version control in Azure DevOps and in this file I just added a element referring to our private nuget package feed.

The build step "Nuget restore" then refers to this file in the "Path to NuGet.config" parameter. This worked.

nuget config

The warning is there for us. We have .nuget/Nuget.config in our solution folder. But Nuget seems to be using the source ok... I don't know why the warning is there in our case.

The option to provide a NuGet.config location is optional (can just be empty).
We use a NuGetDefaults.Config to provide additional sources, but we cannot prevent the warning being shown?

I had a similar issue as you describe -- a warning in my nuget restore task. I came across this issue (https://github.com/Microsoft/azure-pipelines-tasks/issues/6790) and it talked about updating to a newer nuget. I was using Nuget 4.4.1 and I updated the Nuget Tool Installer to use version 4.8.1 and the warning is no longer shown.

I was using Yaml builds, not sure if this applies to you or not but I thought I would pass on the info.

Thank you @brianpelton for the reminder of this open item. We have concluded something similar a few weeks ago, although we upgraded to NuGet 5.0 using the NuGet Tool Installer.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jabbera picture jabbera  路  3Comments

montebhoover picture montebhoover  路  3Comments

MichaelWhiteCodingForFun picture MichaelWhiteCodingForFun  路  3Comments

NatMarchand picture NatMarchand  路  3Comments

TheRealEdwardCullen picture TheRealEdwardCullen  路  3Comments