NuGet Automatic Package Restore not working
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?
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
Support Staff 1 Posted by Feodor Fitsner on 17 Nov, 2014 05:23 PM
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 ornuget restore <solution>
if it's not in the root of the repo.2 Posted by andrewarnott on 17 Nov, 2014 05:45 PM
Thanks. That did the trick.
andrewarnott closed this discussion on 22 Jan, 2016 02:33 PM.