Reputation: 91
I'm getting the following error during the Azure Cloud Build process. How can I fix the problem?
"##[error]Cannot determine the packages folder to restore NuGet packages. Please specify either -PackagesDirectory or -SolutionDirectory."
Upvotes: 9
Views: 7208
Reputation: 659
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.
Upvotes: 3
Reputation: 76920
Just like the build log said, you should give a argument the -PackagesDirectory
or -SolutionDirectory
to specify a folder to store the packages.
Check the restore options for more details.
Hope this helps.
Upvotes: -2