.Net MVC错误无法加载实体框架提供程序类型

use*_*454 1 asp.net-mvc

家伙.我正在研究一个开源的MVC项目.但建成后(通过).我得到了运行时错误.

Server Error in '/' Application.

The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

Source Error: 


Line 15: 
Line 16:        public MVCForumContext() : base("DefaultConnection") { }
Line 17:        public MVCForumContext(String nameOrConnectionString) : base(nameOrConnectionString) { }
Line 18: 
Line 19:        public DbSet<User> Users { get; set; }

Source File: c:\New folder\mvcForum.DataProvider.EntityFramework\MVCForumContext.cs    Line: 17 
Run Code Online (Sandbox Code Playgroud)

你们能给我一些指导吗?谢谢.

Ste*_*eve 8

检查数据库项目中的引用.您应该列出EntityFramework和EntityFramework.SqlServer.如果没有尝试卸载并重新安装EF nuget包,它对我有用.