Mysql: The located assembly's manifest definition does not match the assembly reference
来源:互联网 发布:淘宝用vr试穿 编辑:程序博客网 时间:2024/06/05 11:05
将mysql.data.dll 从版本6.9.4.0换成6.5.4.0是遇到以下异常:
Could not load file or assembly 'MySql.Data, Version=6.5.4.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)
原因:
编译目录(debug或release)下的dll版本和.csproj中定义的版本不一致。
解决办法: 将debug或release下的dll版本换成与.csproj中定义的版本一致。
找到版本不一致的原因:比如多个.csproj引用了的相同的dll但是版本不一致。最后发现我有三个proj引用了MySql.Data但是版本不同,所以每次编译后就会有个csproj中的dll版本与实际copy的版本不一样。
更好的解决办法:
用GAC管理dll.
http://www.cnblogs.com/chenlulouis/archive/2010/06/30/1768176.html
http://stackoverflow.com/questions/215026/the-located-assemblys-manifest-definition-does-not-match-the-assembly-reference
https://msdn.microsoft.com/en-us/library/ex0ss12c%28VS.80%29.aspx (GAC命令的用法)
我的电脑在目录C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools 下可以找到GACUtil.exe
- Mysql: The located assembly's manifest definition does not match the assembly reference
- The located assembly's manifest definition does not match the assembly reference.
- The located assembly’s manifest definition does not match the assembly reference
- Visual Studio 2012开发Windows Phone 8 App遇到的located assembly's manifest definition does not match 的问题
- Could not load file or assembly '***' or one of its does not match the assembly reference
- The reference in the deployment does not match the identity defined in the application manifest..
- UI' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference
- Dynamics CRM2015 The plug-in type does not exist in the specified assembly问题的解决方法
- What’s the difference between alignment, de novo assembly, and map to reference
- The type or namespace name `MovieTexture' could not be found. Are you missing an assembly reference?
- A definition for the symbol '<symbolName>' could not be located
- Assembly Manifest
- Assembly Manifest
- Assembly Manifest
- Assembly Manifest
- Does not match the target endianness问题
- The frontend does not match Zabbix database
- the declared package does not match 解决办法
- poj1743-后缀数组
- sql server 如何预防被探测密码
- Unity2D的碰撞事件解析
- Mysql: Authentication with old password no longer supported, use 4.1 style password
- git团队开发
- Mysql: The located assembly's manifest definition does not match the assembly reference
- Android 调用系统播放器播放视频
- VS2017编译boost库
- C#中Mysql操作的异常: MySQL Connector/Net does not currently support distributed transa
- 最笨的将一物体在屏幕范围内拖动
- 获取spring 上下文的几种方法
- Java 继承
- windows2003 服务器上程序访问https 抛出异常 -2146697191
- 电压基准和稳压电源-BUCK\BOOST原理讲解