关于ServiceStack.Redis的坑及解决方案

ServiceStack.Redis是.net系使用Redis的常用中间件。4.0版本后开始了商业化,每小时只能访问redis6000次。

官方主页还提供了个过渡的3.9.710版本。

用nuget安装好后报错,

Method 'get_Db' in type 'ServiceStack.Redis.RedisNativeClient' from assembly 'ServiceStack.Redis, Version=3.9.71.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

 

根据一老外文章解决:https://ppolyzos.com/2015/10/08/issues-when-downgrading-to-servicestack-redis-v3/

This is happening because of a change in the default behaviour in Nuget as of 2.8 version, where NuGet picks the lowest patch version of a  package dependency.

So, when you request to install ServiceStack.Redis version 3.9.71, which is free to use, ServiceStack.Common comes not on version 3.9.71  but on 3.9.11

只要nuget安装下Install-Package ServiceStack.Common -Version 3.9.71即可。

你可能感兴趣的:(redis,.NET)