NuGet Automatic Package Restore not working

andrewarnott's Avatar


17 Nov, 2014 05:17 PM

Per the docs at, Automatic Package Restore is the preferred means of restoring NuGet packages, and is _not_ part of the build itself. This means the build agents themselves need to run "nuget.exe restore" on the solution file prior to starting the build.
I'm brand new to AppVeyor, but so far I don't see this package restore happening, and my build fails as a result. I see several threads where folks are advised to make NuGet package restore part of the build itself, but that is not only deprecated, but it requires that I check in msbuild dependencies that come from NuGet packages. I don't want to go with that option.

Is there a way to enable Automatic Package Restore on appveyor? Or is there a nuget.exe somewhere on the build agent already that I can invoke from a pre-build script?

  1. Support Staff 1 Posted by Feodor Fitsner on 17 Nov, 2014 05:23 PM

    Feodor Fitsner's Avatar

    Hi Andrew,

    Yes, the latest nuget.exe v2.8.3 is available in %PATH% on build workers.

    Just add nuget restore on "before build" section or nuget restore <solution> if it's not in the root of the repo.

  2. 2 Posted by andrewarnott on 17 Nov, 2014 05:45 PM

    andrewarnott's Avatar

    Thanks. That did the trick.

  3. andrewarnott closed this discussion on 22 Jan, 2016 02:33 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac