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复制等.

  • 相关阅读:
    NOI2010 能量采集
    NOI2011 兔兔与蛋蛋游戏
    动态规划——min/max的单调性优化总结
    NOI2011 NOI嘉年华
    NOI2011 阿狸的打字机
    NOI2011 智能车比赛
    NOI2011 兔农
    NOI2012 魔幻棋盘
    NOI2012 美食节
    NOI2012 迷失游乐园
  • 原文地址:https://www.cnblogs.com/angrycoder/p/12438727.html
Copyright © 2011-2022 走看看