none
EF codefirst 更新表的问题,遇到以下问题该怎么解决,提示 Type is not resolved for member 'MySql RRS feed

  • 问题

  •  Update-Database -Script -ProjectName "Mem.Data" -StartUpProjectName "Mem.Admin.UI" -ConnectionStringName "DataContext"  -Force
    No pending explicit migrations.
    Applying automatic migration: 201404181711012_AutomaticMigration.
    PM> Update-Database -ProjectName "Mem.Data" -StartUpProjectName "Mem.Admin.UI" -ConnectionStringName "DataContext"  -Force
    Specify the '-Verbose' flag to view the SQL statements being applied to the target database.
    No pending explicit migrations.
    Applying automatic migration: 201404181711254_AutomaticMigration.
    System.Runtime.Serialization.SerializationException: Type is not resolved for member 'MySql.Data.MySqlClient.MySqlException,MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'.
       在 System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
       在 System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
       在 System.Data.Entity.Migrations.Design.ToolingFacade.Update(String targetMigration, Boolean force)
       在 System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
       在 System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
    Type is not resolved for member 'MySql.Data.MySqlClient.MySqlException,MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'.
    2014年4月18日 17:17

答案

  • Hi,

    关于MySql在EF上的支持相关的问题,请咨询MySql的专家。

    另外你可能缺少连接器,比如: http://dev.mysql.com/downloads/connector/net/6.0.html

    但这只是一个假设,这里没办法对MySql产品做技术支持。



    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2014年4月21日 9:15
    版主