Is this a solution that you created or downloaded (as an example or work done by a colleague)? You have installed a version of NuGet with data up to the version installed in Visual Studio, and you checked the installed packages for the project - you may need to restore the packages if you downloaded the solution from Source Control or as a zip file online.
The easiest way to do this is to make sure the NuGet Package Manager is updated in Tools> Extensions and Updates, and then (with the selected project selected in Visual Studio) choose Project> NuGet Package Management. If there are installed packages that are not found in your solution packages directory, NuGet should offer to restore them for you.
Alternatively, you can add a package that depends on this package, and you either do not have the package installed or the previous version is installed.
To install a package in the NuGet type- package manager console
Microsoft.AspNet.WebPages.Data Installation Package
Or, search for "Microsoft.AspNet.WebPages.Data" in the "Manage NuGet Packages" window, accessed using the instructions above.
If you have a previous version of the package installed, you may need to reassign this version number to version 3.0.0.0 using the following code in the project configuration file (most likely, Web.config) to avoid breaking packages with dependencies from the previous version-
<dependentAssembly> <assemblyIdentity name="WebMatrix.Data" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> </dependentAssembly>
pwdst Apr 20 '14 at 11:24 2014-04-20 11:24
source share