2016-04-06 2 views
0

移行は昨年働いていましたが、今はどうしますか?去年は移行が完了しましたが、今は移行しません

エラー:(partialy)

PM> update-database
Specify the '-Verbose' flag to view the SQL statements being applied to the target database. System.Runtime.Serialization.SerializationException: O tipo não foi resolvido para o associado 'MySql.Data.MySqlClient.MySqlException,MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'. em System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
em System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner) em System.Data.Entity.Migrations.Design.ToolingFacade.Update(String targetMigration, Boolean force) em System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0() em System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command) The type has not been resolved to the associated 'MySql.Data.MySqlClient.MySqlException,MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'.
PM>

コードが

<configuration> 
    <configSections> 
     <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 
    </configSections>  
    <connectionStrings> 
     <add name="DefaultConnection" connectionString="Data Source=mySERVER;initial catalog=myDB;Integrated Security=false;uid=myID;pwd=myPWD;" providerName="System.Data.SqlClient"/> 
    </connectionStrings> 
    <appSettings> 
    <!-- I will show only if needed --> 
    </appSettings> 
    <system.web> 
    <!-- I will show only if needed --> 
    </system.web> 
    <system.webServer> 
    <modules> 
     <!-- I will show only if needed --> 
    </modules> 

    <handlers> 

     <!-- I will show only if needed --> 
    </handlers> 
</system.webServer> 
    <runtime> 
    <!-- I will show only if needed --> 
    </runtime> 
    <system.data> 
    <DbProviderFactories> 
    <!-- I will show only if needed --> 
    </DbProviderFactories> 
    </system.data> 

    <entityFramework> 
    <providers> 
     <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" /> 
     <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> 
    </providers> 
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> 
    </entityFramework> 

+0

に複数のプロバイダと協力してhaventことに、しかし注意します、あなたは_O TIPO NAO FOI resolvidoパラO associado_の翻訳を提供することができますか? – wimh

+0

ああ、ごめんなさい: – Lucas

+0

これをチェックして、可能な複製:http://stackoverflow.com/questions/26806753/error-while-running-update-database-in-mvc5 –

答えて

0

設定ファイルであなただけの接続文字列は、指していると思われます「System.Data.SqlClient」が唯一のサーバーにプロバイダ; ...そしてstacktraceはMySQLについて泣いています。

あなたはMySQLをサポートするものを提供する必要があると思います。

私は私が同じプロジェクト:)

+0

は機能しませんでしたが、注目してくれてありがとうございます。 – Lucas

関連する問題