NuGet Automatic Package Restore not working

andrewarnott's Avatar

andrewarnott

17 Nov, 2014 05:17 PM

Per the docs at http://docs.nuget.org/docs/reference/package-restore, 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

Generic

? 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

Recent Discussions

21 Aug, 2019 11:06 PM
21 Aug, 2019 02:08 PM
21 Aug, 2019 01:37 PM
21 Aug, 2019 10:21 AM
21 Aug, 2019 09:10 AM

 

21 Aug, 2019 05:56 AM
21 Aug, 2019 03:08 AM
20 Aug, 2019 11:33 PM
20 Aug, 2019 08:07 PM
20 Aug, 2019 05:50 PM
20 Aug, 2019 12:35 PM