Reputation: 1803
Visual Studio 2013 introduced new way of package restore without MSBuild and the old way of Enable NuGet Package Restore is deprecated now.
After migrating a project, as written in Nuget docs, when building in VisualStudio package restore works, but when build is run using command line VisulStudio and event vcvarsall.bat packages are not restored.
Am I missing something?
Well, if you invoke Visual Studio from command line, package restore is not called. Use manual package restore with nuget.exe
nuget restore Solution.sln
For this particular line to work you'll need to install NuGet system wide and add path to it's binaries folder into
PATH
environment variable
Upvotes: 4
Views: 1702
Reputation: 114661
On the commandline you must manually run Nuget restore solution.sln
before invoking msbuild.exe
. It's just a small step before the build runs.
Visual Studio does this automatically and the call to nuget restore
is also executed by Team Build as part of the workflow.
Upvotes: 6