Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Error "Cannot determine the packages folder to restore NuGet packages" during azure could build is processing

Tags:

nuget

restore

I'm getting the following error during Cloud Build

"##[error]Cannot determine the packages folder to restore NuGet packages. Please specify either -PackagesDirectory or -SolutionDirectory."

like image 826
Rajasekhar Pasalapudi Avatar asked Nov 16 '22 14:11

Rajasekhar Pasalapudi


1 Answers

I ran into this error verbatim after running nuget.exe restore on a project that didn't actually reference any NuGet packages, however, within the project's directory sat a packages.config file containing an entry to a package. This config file was not included or referenced by the project, it was just sitting in the directory.

Deleting the stray packages.config file resolved the error.

like image 67
Mr.Z Avatar answered Dec 28 '22 14:12

Mr.Z