4
votes

I've got a build running in VSTS which is restoring NuGet packages from both nuget.org and a custom feed in VSTS. The custom feed is in the solutions NuGet.config as a <packageSource>, along with the user name and password in <packageSourceCredentials>

The build, including the restore, is working Ok, but there is a warning ...

2016-10-12T16:18:57.6589001Z ##[warning]To connect to NuGet feeds 
    hosted in your Team Services account/TFS project collection with 
    NuGet 3.1 or below, edit your build definition to specify a path 
    to a NuGet.config containing the package sources you wish to use.

How can I remove this?

1
The submitted issue has been updated and I updated my answer, you can check it.starian chen-MSFT
There isn't the waring if you specified Nuget.config in build definition, but you said that the Nuget.config is in the solution and you get that warning, how do you specify it?starian chen-MSFT

1 Answers

4
votes

Based on my test, that warning remains even through using higher version of nugget (e.g. 3.3) or do not restore package from VSTS feed. (Hosted build agent has the same result).

You can’t remove it unless you custom a build task to restore package through command line.

I submit a issue here.

Update:

The issue has been updated.

I see the issue in the code coming from our transition from depending on assets coming with the agent to being deployed with the task. You can get around this for now until we get an official change out by either (1) choosing to use the Nuget 3.5 version radio button in the task config or (2) supplying a path to your nuget.config.

So, you can use Nuget 3.5 version or specify nuget.config file.