未能加载 mysql.data_无法加载文件或程序集’MySql.Data

我正在开发ASp.net mvc 5中的应用程序并使用代码优先方法.

当我尝试启用迁移时,它会抛出一个错误.我在参考文献中找到了MySQL.Data.dll.可能是什么问题?

如果可能的话,请指导我.谢谢

错误在下面提到;

enable-migrations -contexttypename SMSContext

Checking if the context targets an existing database...

System.IO.FileLoadException: Could not load file or assembly 'MysqL.Data,Version=6.9.3.0,Culture=neutral,PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

File name: 'MysqL.Data,PublicKeyToken=c5687fc88969c44d'

at System.RuntimeTypeHandle.GetTypeByName(String name,Boolean throwOnError,Boolean ignoreCase,Boolean reflectionOnly,StackCrawlMarkHandle stackMark,IntPtr pPrivHostBinder,Boolean loadTypeFromPartialName,ObjectHandleOnStack type)

at System.RuntimeTypeHandle.GetTypeByName(String name,StackCrawlMark& stackMark,Boolean loadTypeFromPartialName)

at System.RuntimeType.GetType(String typeName,StackCrawlMark& stackMark)

at System.Type.GetType(String typeName)

at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)

at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)

at System.Data.Entity.Infrastructure.DependencyResolution.DefaultProviderFactoryResolver.GetService(Type type,Object key,Func`3 handleFailedLookup)

at System.Data.Entity.Infrastructure.DependencyResolution.DefaultProviderFactoryResolver.GetService(Type type,Object key)

at System.Data.Entity.Infrastructure.DependencyResolution.CachingDependencyResolver.MysqL.Data,PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值