I have a package feed on VSTS providing several packages that I reference in a solution that is also being built on VSTS. The builds have suddenly started failing at the package restore phase with the logs indicating that it cannot find the dlls nuget is supposed to restore.
Restoring NuGet package Basd.Diagnostics.0.7.0.
WARNING: Unable to find version '0.7.0' of package 'Basd.Diagnostics'.
The public / private feeds are listed in my nuget.config and they also show up in the build logs "Using Feeds..."
so it's not a matter of the restore operation not being able to find the actual feeds for the package. It's more like it can't authenticate and therefore can't retrieve the package from the feed.
If I look at the history for the build definition there is a change from when it last worked to now and that is this:
"build": [
{
"enabled": true,
"continueOnError": false,
"alwaysRun": false,
"displayName": "NuGet restore MySol.sln",
"timeoutInMinutes": 0,
"task": {
"id": "333b11bd-d341-40d9-afcf-b32d5ce6f23b",
"versionSpec": "*",
"definitionType": "task"
},
"inputs": {
"solution": "Basd.Core.sln",
"nugetConfigPath": "nuget.config",
"restoreMode": "restore",
"noCache": "false",
"nuGetRestoreArgs": "",
"verbosity": "",
"nuGetPath": "",
"preCredProviderNuGet": "false"
}
},
There is now a "preCredProviderNuGet": "false"
field in the definition. I've googled but I can't find out how and where this is set but I'm assuming this is preventing authentication to my feed which in turn is why the restore operation fails.
So where is this setting and/or how do I turn it back on or remove it as an entry? In the working build def, it was not set to true, it just didn't exist.
Is it a VSTS UI related field or something I set in nuget.config files? I'm assuming the former because again doing a diff suggests nothing has changed in my nuget.config between working and non working builds.
This seems to be caused by the VSTS issue which should be fixed by now, please try the build agent.
Issue: Packaging issues with Visual Studio Team Services – 7/30 – Resolved