我們試圖爲我們的代碼首先實施EF5 MySQL項目的遷移。但是當我們在包管理器中運行update-database命令時,我們得到一個奇怪的錯誤:MySQL實體框架遷移
任何人都知道爲什麼?
System.Data.ProviderIncompatibleException: The provider did not return a ProviderManifest instance. ---> System.ArgumentException: Could not determine storage version; a valid storage connection or a version hint is required. at System.Data.SqlClient.SqlVersionUtils.GetSqlVersion(String versionHint) at System.Data.SqlClient.SqlProviderManifest..ctor(String manifestToken) at System.Data.SqlClient.SqlProviderServices.GetDbProviderManifest(String versionHint) at System.Data.Common.DbProviderServices.GetProviderManifest(String manifestToken) --- End of inner exception stack trace --- at System.Data.Common.DbProviderServices.GetProviderManifest(String manifestToken) at System.Data.Entity.Migrations.Sql.SqlServerMigrationSqlGenerator.Generate(IEnumerable
1 migrationOperations, String providerManifestToken) at System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, XDocument targetModel, IEnumerable
1 operations, Boolean downgrading, Boolean auto) at System.Data.Entity.Migrations.DbMigrator.ApplyMigration(DbMigration migration, DbMigration lastMigration) at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.ApplyMigration(DbMigration migration, DbMigration lastMigration) at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable1 pendingMigrations, String targetMigrationId, String lastMigrationId) at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.Upgrade(IEnumerable
1 pendingMigrations, String targetMigrationId, String lastMigrationId) at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration) at System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update(String targetMigration) at System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.RunCore() at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()
您可以將您的dbcontext類以及您的web.config文件放在這裏,以便我們可以看一看嗎? –