我正在开发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)