zoukankan      html  css  js  c++  java
  • ibatis.net 不明确的引用 Ambiguous match found

    We are using IBatis Data Access 1.9.2 since a long time with .NET 3.5SP1 and 
    it's working fine.
    Also we decide to transfer part of the project to .NET 4 and we have some 
    errors in the IBatis Builder.Configure method.

    ----------------------------------------
    I have noticed that the error is within the Castle.DynamicProxy dll.  More 
    specifically, the class file in that dll: 
    Castle.DynamicProxy.Builder.CodeBuilder.SimpleAST.LockBlockExpression invokes 
    with reflection the method System.Threading.Monitor.Enter without specifying 
    (new in .net 4.0) the overload arguments. Changing that line of code to: 
    gen.Emit(OpCodes.Call, typeof(Monitor).GetMethod("Enter", new Type[] { 
    typeof(object) })); should solve the problem.
    ------------------------------------------
    In the mean time, you can set the target framework in the properties window for 
    your project to .net 3.5 and that will solve the issue as well.
    -------------------------------------------------------
    简言之,ibatis.net 某些版本在4.0环境下会出现标题的问题,这是一个BUG!要解决它可以用新的Castle.DynamicProxy.
    引用不同版本的dll可以参见https://blog.csdn.net/dang13579/article/details/72956684
    防止其它project的ibatis引用捣乱可以把dll属性的复制到本地改为false,总之是个有些烦人的bug
    ,牵扯到dll签名,引用不同版本的dll,以及dll复制等.

  • 相关阅读:
    使用Vim写LaTeX代码(Vim+Vimtex+Skim)
    如何安装vim自动补全插件YouCompleteMe(YCM)
    我的vimrc配置
    囚徒问题(100 prisoners problem)的python验证
    tomcat下运行多个项目
    转使用chrome命令行:disable-web-security 实现浏览器跨域
    Spring Session
    nodejs 之 nvm和pm2
    chrome地址栏命令
    Koa2和相关资料
  • 原文地址:https://www.cnblogs.com/angrycoder/p/12438727.html
Copyright © 2011-2022 走看看