2017-05-19 9 views
0

私はMySqlデータベースからSql Serverデータベースに切り替えています。EF 6データベースの更新が失敗しました

設定とweb.configからmysqlに関連するすべてのデータを削除します。

しかし、私はまだパッケージマネージャコンソールで更新-Databaseコマンドでこの問題を得る:

Update-Database -Verbose 
Using StartUp project 'B2Peer.Web'. 
Using NuGet project 'B2Peer.EntityFramework'. 
Specify the '-Verbose' flag to view the SQL statements being applied to the 
target database. 
Target database is: 'b2peer' (DataSource: .\SQLLOCAL, Provider: 
System.Data.SqlClient, Origin: Configuration). 
No pending explicit migrations. 
System.Data.Entity.Core.MetadataException: Schema specified is not valid. 
Errors: 
(0,0) : error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'MySql.Data.MySqlClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. 

私は解決策を洗浄し、

を再構築私はEFを避けるためにきれいにすることができる任意のキャッシュファイルがありますプロバイダのMySQLを探しますか?

注:最後にそれが修正されました、私は私のソリューションフォルダ内のすべてのファイルに++メモ帳で検索し、私の検索「のmysql」に関連するものは何も存在しない...なぜEFはまだこのプロバイダを探してい...

答えて

0

複数のクリーンビルド後、ウェブサイトを起動して、自動的にマイグレーションを実行します。

このエラーが発生すると、Update-Databaseが停止しました...

関連する問題