.net 4.6.2连接redis报The assembly for System.Buffers and System.IO.Pipelines could not be loaded问题

Posted 左直拳

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了.net 4.6.2连接redis报The assembly for System.Buffers and System.IO.Pipelines could not be loaded问题相关的知识,希望对你有一定的参考价值。

这段时间重操旧业,搞笃NET搞得不亦乐乎。发现有个问题,程序发布以后,同样的程序和配置,在服务器上报错,在开发机正常。

报错的代码是这样的:

The assembly for System.Buffers and System.IO.Pipelines could not be loaded; this usually means a missing assembly binding redirect - try checking this, and adding any that are missing; note that it is not always possible to add this redirects - for example 'azure functions v1'; it looks like you may need to use 'azure functions v2' for that - sorry, but that's out of our control


从中可知,是在连接redis时报错了。

连接另一个redis,还是报错;

将服务器的程序原原本本打包,拿到我自己开发机器上(win10)运行,正常;拿到另一台win7的机器上运行,也正常;

看来是服务器环境的问题。在网上寻寻觅觅,比较dll版本啦,修改web.config啦,都不好使。

后来发现,我机器点net的版本是4.8,另一台win7的是4.7.2,而服务器是4.6.2。将服务器.net升级到4.7.2,问题解决。

以上是关于.net 4.6.2连接redis报The assembly for System.Buffers and System.IO.Pipelines could not be loaded问题的主要内容,如果未能解决你的问题,请参考以下文章

连接远程的redis 集群报Could not get a resource from the pool异常

通过jedis连接redis单机成功,使用redis客户端可以连接集群,但使用JedisCluster连接redis集群一直报Could not get a resource from the poo

JedisCluster连接redis集群一直报Could not get a resource from the pool

redis集群报错:(error) CLUSTERDOWN The cluster is down

jedis连接集群报Could not get a resource from the pool错误

Redis 安装报错 You need tcl 8.5 or newer in order to run the Redis test