摘要: install-package ef6,mysql.data;增加provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d";修改edmx Schema的Provider="MySql.Data.MySqlClient"

 
百度:ef5 mysql
 
百度:dotconnect for mysql 破解  可以找到极限软件网站上的 dcmysql的破解版
 
{"创建 entityFramework 的配置节处理程序时出错: 未能加载文件或程序集“EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040) (D:\\SourceProject\\chuxing_ver1\\trunk\\TravelWebApi\\TravelWebApi\\web.config line 9)"}
 
用户代码未处理 System.TypeInitializationException
  HResult=-2146233036
  Message=“BLL.BasicBll.ChemapaoBll”的类型初始值设定项引发异常。
  Source=BLL
  TypeName=BLL.BasicBll.ChemapaoBll
  StackTrace:
       在 BLL.BasicBll.ChemapaoBll.GetEmployees(Int64 entId)
       在 TravelWebApi.Controllers.QueryController.EntDetail(Int64 entId) 位置 d:\SourceProject\chuxing_ver1\trunk\TravelWebApi\TravelWebApi\Controllers\QueryController.cs:行号 36
       在 lambda_method(Closure , ControllerBase , Object[] )
       在 System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
       在 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
       在 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
       在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
       在 System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
       在 System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
       在 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
       在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
       在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
  InnerException: System.TypeInitializationException
       HResult=-2146233036
       Message=“System.Data.Entity.Internal.AppConfig”的类型初始值设定项引发异常。
       Source=EntityFramework
       TypeName=System.Data.Entity.Internal.AppConfig
       StackTrace:
            在 System.Data.Entity.Internal.AppConfig.get_DefaultInstance()
            在 System.Data.Entity.Internal.LazyInternalConnection..ctor(DbContext context, String nameOrConnectionString)
            在 System.Data.Entity.DbContext..ctor(String nameOrConnectionString)
            在 EF.ChemapaoEntities..ctor() 位置 d:\SourceProject\chuxing_ver1\trunk\TravelWebApi\DataAccess\EF\Chemapao.Context.cs:行号 18
            在 BLL.BasicBll.ChemapaoBll..cctor() 位置 d:\SourceProject\chuxing_ver1\trunk\TravelWebApi\Business\BLL\BasicBll\ChemapaoBll.cs:行号 15
       InnerException: System.Configuration.ConfigurationErrorsException
            HResult=-2146232062
            Message=创建 entityFramework 的配置节处理程序时出错: 未能加载文件或程序集“EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040) (D:\SourceProject\chuxing_ver1\trunk\TravelWebApi\TravelWebApi\web.config line 9)
            Source=System.Configuration
            BareMessage=创建 entityFramework 的配置节处理程序时出错: 未能加载文件或程序集“EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
            Filename=D:\SourceProject\chuxing_ver1\trunk\TravelWebApi\TravelWebApi\web.config
            Line=9
            StackTrace:
                 在 System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
                 在 System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
                 在 System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
                 在 System.Web.HttpContext.GetSection(String sectionName)
                 在 System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName)
                 在 System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
                 在 System.Configuration.ConfigurationManager.GetSection(String sectionName)
                 在 System.Data.Entity.Internal.AppConfig..ctor()
                 在 System.Data.Entity.Internal.AppConfig..cctor()
            InnerException: System.IO.FileLoadException
                 HResult=-2146234304
                 Message=未能加载文件或程序集“EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
                 Source=System.Configuration
                 FileName=EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
                 FusionLog==== 预绑定状态信息 ===
日志: DisplayName = EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
(Fully-specified)
日志: Appbase = file:///D:/SourceProject/chuxing_ver1/trunk/TravelWebApi/TravelWebApi/
日志: 初始 PrivatePath = D:\SourceProject\chuxing_ver1\trunk\TravelWebApi\TravelWebApi\bin
调用程序集: System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35。
===
日志: 此绑定从 default 加载上下文开始。
日志: 正在使用应用程序配置文件: D:\SourceProject\chuxing_ver1\trunk\TravelWebApi\TravelWebApi\web.config
日志: 使用主机配置文件: C:\Users\Administrator\Documents\IISExpress\config\aspnet.config
日志: 使用 C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config 的计算机配置文件。
日志: 在应用程序配置文件中找到重定向: 4.4.0.0 已重定向到 5.0.0.0。
日志: 策略后引用: EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
日志: 尝试下载新的 URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/8f0d007c/83612a6c/EntityFramework.DLL。
日志: 尝试下载新的 URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/8f0d007c/83612a6c/EntityFramework/EntityFramework.DLL。
日志: 尝试下载新的 URL file:///D:/SourceProject/chuxing_ver1/trunk/TravelWebApi/TravelWebApi/bin/EntityFramework.DLL。
警告: 比较程序集名称时发生不匹配: 主版本
错误: 未能完成程序集的安装(hr = 0x80131040)。探测终止。

StackTrace:
                      在 System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)
                      在 System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
                      在 System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
                      在 System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
                      在 System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)

                 InnerException:
 
 
更新成ef6后:
“System.Data.Entity.Core.MetadataException”类型的异常在 mscorlib.dll 中发生,但未在用户代码中进行处理

其他信息: 指定的架构无效。错误:

Chemapao.ssdl(2,2) : 错误 0152: 未找到具有固定名称“Devart.Data.MySql”的 ADO.NET 提供程序的实体框架提供程序。请确保在应用程序配置文件的“entityFramework”节中注册了该提供程序。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkId=260882。 
 
 
 
改为:
{"无法为具有固定名称“MySql.Data.MySqlClient”的 ADO.NET 提供程序加载在应用程序配置文件中注册的实体框架提供程序类型“MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d”。请确保使用限定程序集的名称且该程序集对运行的应用程序可用。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkId=260882。"}
 
{"创建 entityFramework 的配置节处理程序时出错: 在应用程序配置中使用不同的提供程序类型名称多次指定固定名称“MySql.Data.MySqlClient”的提供程序。对于每个已配置的提供程序,提供程序类型名称必须唯一。 (D:\\SourceProject\\chuxing_ver1\\trunk\\TravelWebApi\\TravelWebApi\\web.config line 123)"}
 
 
{"未能加载文件或程序集“MySql.Data.Entity.EF6, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)":"MySql.Data.Entity.EF6, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"}
 
未能加载文件或程序集“MySql.Data.Entity.EF6, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)

我的ef连接mysql之旅的更多相关文章

  1. EF 连接MySQL 数据库  保存中文数据后乱码问题

    EF 连接MySQL 数据库  保存中文数据后乱码问题 采用Code First 生成的数据库,MySQL数据库中,生成的表的编码格式为***** 发现这个问题后,全部手动改成UTF8(图是另一个表的 ...

  2. EF连接mysql数据库生成实体模型

    声明:本人也是第一次用EF连接mysql生成实体模型 经过试验: mysql-connector-net-6.6.6 可以支持VS2012 mysql-connector-net-6.3.9 可以支持 ...

  3. EF连接MySQL数据Web.Config配置

    EF连接MySQL数据Web.Config配置 <?xml version="1.0" encoding="utf-8"?> <configu ...

  4. 如何用VS EF连接 Mysql,以及执行SQL语句 和存储过程?

    VS2013, MySQL5.7.18 , MySQL5.7.14 执行SQL语句: ztp_user z = new ztp_user(); object[] obj = new object[] ...

  5. ASP.NET MVC5+EF6+EasyUI 后台管理系统(91)-EF 连接 MySql

    前言 虽然系统目前只支持MSSQL版本,但是很多朋友公司技术规定必须使用MySql,下面我们就来使用EF连接MySQL吧! (1)安装MYSQL环境 1.下载安装MYSQL数据,这里我们安装phpSt ...

  6. EF连接MySql数据库

    Windows要想EF连接MySql,首先要安装两个应用程序 mysql-connector-net-6.8.8.msimysql-for-visualstudio-1.2.7.msi 项目还需要两个 ...

  7. .NET5控制台程序使用EF连接MYSQL

    .NET5控制台程序使用EF连接MYSQL 1.使用nuget下载: Microsoft.Extensions.Configuration.Json Pomelo.EntityFrameworkCor ...

  8. EF 连接MySql

    使用EntityFramework6连接MySql数据库(db first方式) http://www.cnblogs.com/24la/archive/2014/04/03/ef6-mysql.ht ...

  9. EF连接mysql,出现A call to SSPI failed错误,解决办法

    我的使用场景是用EF连接AWS的mysql RDS,会偶发性的出现A call to SSPI failed错误, System.AggregateException: One or more err ...

随机推荐

  1. Sublime Text 安装Emmet

    1.简单的安装方法 从菜单 View - Show Console 或者 ctrl + ~ 快捷键,调出 console.将以下 Python 代码粘贴进去并 enter 执行,不出意外即完成安装.以 ...

  2. Xamarin +vs2015 Android 开发GPS loaction 返回 null 小结

    最近公司要开发android 所以研究了一下Xamarin  to android 中个GPS 废话不多说,说重点. 想获取手机上的gps信息必不可少的就是要使用 LocationManager Lo ...

  3. Html/Css(新手入门第三篇)

    一.学习心得---参考优秀的网页来学习. 1我们只做的静态网页主要用的技术?html+css 只要网上看到的,他的源代码公开的.[1].先去分析,他们页面是如何布局(结构化)[2].再试着去做一下,- ...

  4. lib/sqlalchemy/cextension/processors.c:10:20: 致命错误: Python.h:没有那个文件或目录

    本文地址:http://www.cnblogs.com/yhLinux/p/4063444.html $ sudo easy_install sqlalchemy [sudo] password fo ...

  5. bochs上网及配置

    下载并安装bochs2.6:(不能是更高版本) 创建bochs 时注意勾选Dlx linux Demo,但是其文件bochsrc.bxrc中无Ne2k网卡选项,这一段要自己添加,详情见后. 先确定我们 ...

  6. python socket server源码学习

    原文请见:http://www.cnblogs.com/wupeiqi/articles/5040823.html 这里就是自己简单整理一下: #!/usr/bin/env python # -*- ...

  7. VIM(四) C语言开发插件设置

    http://blog.csdn.net/guolb57/article/details/7013076

  8. Python成长笔记 - 基础篇 (十三)--堡垒机

    堡垒机架构 堡垒机的主要作用权限控制和用户行为审计,堡垒机就像一个城堡的大门,城堡里的所有建筑就是你不同的业务系统 , 每个想进入城堡的人都必须经过城堡大门并经过大门守卫的授权,每个进入城堡的人必须且 ...

  9. 解决eclipse-helios中Errors running builder JavaScript Validator的问题(转)

    原文地址:http://hi.baidu.com/%B3%BF%D1%F4%C2%FE%B2%BD/blog/item/2528f6de3ca90955ccbf1a3f.html 最近下载了eclip ...

  10. Android ExpandableListView

    ExpandableListView 结合SimpleExpandableListAdapter用法 最终实现效果: activity_main.xml <?xml version=" ...