Error 1 Type "System.Data.Entity.DbContext" is defined in an unreferenced assembly. A reference to the assembly "EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" must be added.
Today, when using VS2012 for MVC4 project development, I found such an error, which is very strange. Everything that should be quoted is quoted. Finally, I found a lot of information and found a solution.
1. Tools - "Library Package Manager - " to manage the solution's nuget packages 2. Select the installed package, find EntityFramework, and click Manage
Since I was using EF's "Data Context Object" in my Taobao_DAL, he gave me an error. So we have to check it and install EF5.0. Finally we found a few more references.
Of course I'm using VS2012, if you have a lower version, you may need to install Nuget first. You can uninstall and then add it. Finally, just look at the quotation to see if it is there.
|