I have an ASP.NET MVC5 application that worked yesterday and now I am getting this error when I try to build:
This project references NuGet package(s) that are missing on this computer.
I have the two options checked that allow nuget to automatically download and install missing packages checked / turned ON. I have also tried deleting all of the files in the packages folder and then have nuget re-download them. Also when I open nuget and look for updates it says there are none that need to be installed. I can't figure what else to do to move beyond this amazingly annoying issue.
In my case, I had to remove the following from the .csproj file:
In fact, in this snippet you can see where the error message is coming from.
I was converting from MSBuild-Integrated Package Restore to Automatic Package Restore (http://docs.nuget.org/docs/workflows/migrating-to-automatic-package-restore)
I had the same issue. In my case installing the Microsoft.Bcl.Build package fixed the problem.
Is it possible that the packages have been restored to the wrong folder? Check that the paths in the csproj files are correct.
If they are different it could be caused by the packages now being restored to a different location. This could be caused by a NuGet.Config file being checked in specifying a node like this:
The packages are being restored, by the projects are still looking at the old location.
That's can happen when you try to remove postsharp from you project.
Ensure you remove lines Loren said.
I easily solve this problem by right clicking on my solution and then clicking on the Enable NuGet Package Restore option
(P.S: Ensure that you have the Nuget Install From Tools--> Extensions and Update--> Nuget Package Manager for Visual Studio 2013. If not install this extention first)
Hope it helps.
In my case it had to do with the Microsoft.Build.Bcl version. My nuget package version was 1.0.21, but my project files were still pointing to version 1.0.14
So I changed my .csproj files from:
to:
And the build was working again.