bindingredirect 没有效果

在搞在线聊天室的时候用到了SignalR 1.1.4,依赖于Newtonsoft.Json 4.5.0.0。

而我另外的dll又依赖Newtonsoft.Json 6.0.0.0

我只引用6.0.0.0的时候提示找不到4.5.0.0的dll,

搜了一下用bindingredirect ,但是搞半天还是报同样的错误,后面发现是配置写错了。

错误的配置:

      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" PublicKeyToken="30ad4fe6b2a6aeed"  culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>

正确的配置:

      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"  culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>

 

万能的vs编译器木有告诉我,我哪里写错了。

搜这里知道的:http://stackoverflow.com/questions/3490327/assembly-binding-redirect-does-not-work

 

转载于:https://www.cnblogs.com/echofool/p/assembly-binding-redirect-does-not-work.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值