question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nuget restore task fails while restoring from VSTS

See original GitHub issue

Nuget restore task is failing when attempting to restore packages in VSTS build. Local restore in visual studio works fine. See log below.

Same as issue: #2173

2016-10-03T12:18:38.9198911Z ##[section]Starting: NuGet restore Platform.sln 2016-10-03T12:18:39.6564698Z [command]C:\Windows\system32\chcp.com 65001 2016-10-03T12:18:39.7014701Z Active code page: 65001 2016-10-03T12:18:39.7414706Z Detected NuGet version 3.3.0.212 / 3.3.0 2016-10-03T12:18:39.7484706Z SYSTEMVSSCONNECTION exists true 2016-10-03T12:18:39.7764701Z save nuget.config to temp config file 2016-10-03T12:18:39.7764701Z Preparing to set credentials in NuGet.config 2016-10-03T12:18:39.7774696Z [command]C:\a\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.17\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe sources Remove -NonInteractive -Name tos-nuget -ConfigFile C:\a\1\Nuget\tempNuGet_882.config 2016-10-03T12:18:40.8763939Z Package source with Name: xxx removed successfully. 2016-10-03T12:18:40.8763939Z Setting credentials in NuGet.config 2016-10-03T12:18:40.8813957Z [command]C:\a\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.17\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe sources Add -NonInteractive -Name xxx -Source https://xxx.pkgs.visualstudio.com/DefaultCollection/_packaging/xxx/nuget/v3/index.json -Username VssSessionToken -Password ******** -ConfigFile C:\a\1\Nuget\tempNuGet_882.config 2016-10-03T12:18:41.5683947Z Package Source with Name: xxx added successfully. 2016-10-03T12:18:41.5775228Z [command]C:\a\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.17\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe restore -NonInteractive C:\a\1\s\Platform.sln -ConfigFile C:\a\1\Nuget\tempNuGet_882.config 2016-10-03T12:18:42.3940437Z MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'. 2016-10-03T12:18:42.5453306Z Error parsing solution file at C:\a\1\s\Platform.sln: Exception has been thrown by the target of an invocation. 2016-10-03T12:18:42.5783371Z ##[error]Error: C:\a\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.17\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe failed with return code: 1 2016-10-03T12:18:42.5783371Z ##[error]Packages failed to install 2016-10-03T12:18:42.5833372Z ##[section]Finishing: NuGet restore Platform.sln

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11

github_iconTop GitHub Comments

7reactions
petervandenhoutcommented, Oct 4, 2016

Solved it. It was an error in my solution file. After I disabled the nuget restore task and check “restore nuget” on the build solution task I got an error message that explained what was going on.

Platform.sln(1008,0): Error MSB5023: Error parsing the nested project section in solution file. A project with the GUID "{8F2B4ACA-F351-4ED0-866B-0BB56EA083A4}" is listed as being nested under project "{2AB87963-D7EA-431D-B3C5-14AEED135243}", but does not exist in the solution.

It would be nice if the nuget task would return better exception messages…

4reactions
haydenhancockcommented, Oct 12, 2016

I am having a similar issue but I don’t see anything mentioned on their blog about thier service being down. Here is my exact error message:

Error: C:\Agent_work_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.17\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe failed with return code: 1 Packages failed to install

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuget Restore Task failing from DevOps Nuget feed with ...
We have a Build pipe line that runs a Nuget Restored Task using a Azure DevOps Nuget feed. It intermittently fails with.
Read more >
Troubleshooting NuGet Package Restore in Visual Studio
This article focuses on common errors when restoring packages and steps to resolve them. Package Restore tries to install all package ...
Read more >
Nuget restore fails on Azure Devops with message "unable to ...
The restore task successfully pulled from my private artifact feeds and restored the projects without hassle. Before adding this, the publish ...
Read more >
How to Fix Missing NuGet Packages in Azure DevOps
With this setting you must make sure that your build task does not try to restore NuGet packages as well. This option is...
Read more >
Azure DevOps: The nuget command failed with exit code(1 ...
Few days ago I had strange situation with NuGet restore on one of my ... pipeline I got some strange error when restoring...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found