Reputation: 40002
Why do I get the following build output error when I already have NuGet package restore enabled?
Restoring NuGet packages...
To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
All packages listed in packages.config are already installed.
MyProject.csproj: error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.
It only happens on one project.
I am using Visual Studio 2013 and NuGet 2.8.
Upvotes: 2
Views: 932
Reputation: 59001
Make sure to upgrade to the latest version of NuGet which does package restore automatically. See this post by David Ebbo for more information: http://blog.davidebbo.com/2014/01/the-right-way-to-restore-nuget-packages.html
You're going to want to delete the NuGet targets (delete the .nuget
folder and then manually edit your .csproj files and remove the lines that import the NuGet.targets file). This is no longer needed. When you compile your solution, NuGet will restore it.
Upvotes: 1