C# 无法使用EntityFramework创建新数据库

C# 无法使用EntityFramework创建新数据库,c#,entity-framework,sql-server-2014,C#,Entity Framework,Sql Server 2014,我有SQL Server 2014开发者版,并使用实体框架5.0。当我第一次尝试点击页面时,EntityFramework无法创建新数据库,并收到下面的错误消息 The provider manifest given is not of type 'System.Data.SqlClient.SqlProviderManifest'. ArgumentException: The provider manifest given is not of type 'System.Data.SqlCl

我有SQL Server 2014开发者版,并使用实体框架5.0。当我第一次尝试点击页面时,EntityFramework无法创建新数据库,并收到下面的错误消息

The provider manifest given is not of type 'System.Data.SqlClient.SqlProviderManifest'.

ArgumentException: The provider manifest given is not of type 'System.Data.SqlClient.SqlProviderManifest'.]
   System.Data.SqlClient.SqlProviderServices.GetSqlVersion(StoreItemCollection storeItemCollection) +2600711
   System.Data.SqlClient.SqlProviderServices.DbCreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection) +213
   System.Data.Common.DbProviderServices.CreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection) +21
   EFProviderWrapperToolkit.DbProviderServicesBase.DbCreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection) +150
   System.Data.Objects.ObjectContext.CreateDatabase() +84
   System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection connection) +83
   System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists() +70
   System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration) +44
   System.Data.Entity.MigrateDatabaseToLatestVersion`2.InitializeDatabase(TContext context) +62
   System.Data.Entity.<>c__DisplayClass2`1.<SetInitializerInternal>b__0(DbContext c) +70
   System.Data.Entity.Internal.<>c__DisplayClass8.<PerformDatabaseInitialization>b__6() +19
   System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +60
   System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +181
   System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c) +7
   System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +110
   System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +185
   System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() +73
   System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes() +60
   System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext() +25
给定的提供程序清单不是“System.Data.SqlClient.SqlProviderManifest”类型。
ArgumentException:给定的提供程序清单的类型不是“System.Data.SqlClient.SqlProviderManifest”。]
System.Data.SqlClient.SqlProviderServices.GetSqlVersion(StoreItemCollection StoreItemCollection)+2600711
System.Data.SqlClient.SqlProviderServices.DbCreateDatabase(DbConnection连接,Nullable`1 commandTimeout,StoreItemCollection StoreItemCollection)+213
System.Data.Common.DbProviderServices.CreateDatabase(DbConnection连接,Nullable`1 commandTimeout,StoreItemCollection StoreItemCollection)+21
EFProviderWrapperToolkit.DbProviderServicesBase.DbCreateDatabase(DbConnection连接,可空`1 commandTimeout,StoreItemCollection StoreItemCollection)+150
System.Data.Objects.ObjectContext.CreateDatabase()+84
System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection)+83
System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists()+70
System.Data.Entity.Migrations.DbMigrator.Update(字符串targetMigration)+44
System.Data.Entity.MigrateDatabaseToLatestVersion`2.InitializeDatabase(TContext上下文)+62
System.Data.Entity.c_uuuuDisplayClass2`1.b_uuuu0(DbContext c)+70
System.Data.Entity.Internal.c__;u DisplayClass8.b_;u 6()+19
System.Data.Entity.Internal.InternalContext.PerformilizationAction(Action Action)+60
System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()+181
System.Data.Entity.Internal.LazyInternalContext.b_u4(InternalContext c)+7
System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput输入)+110
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 Action)+185
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()+73
System.Data.Entity.Internal.InternalContext.ForceSpaceLoadingForknowEntityTypes()+60
System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()+25

任何帮助都将不胜感激。

您使用的是哪种数据库初始值设定项?我使用的是MigrateToLatestVersionI,我发现此信息引用了我的问题()-因为我无法升级到EF 6,因此,EF 5.0是否有一个解决方案?您是否在这里询问,是否有一种方法可以在不更新到供应商提供了修复程序的版本的情况下不受软件缺陷的影响?一个2年前被试用过的bug?我在问是否有任何解决方法