System.MissingMethodException: Method not found: 'Couchbase.Core.IBucket Couchbase.Extensions.DependencyInjection.INamedBucketProvider.GetBucket()'

I am trying to implement distributed cache in .Net core using Couchbase

An unhandled exception was thrown by the application. <s:Microsoft.AspNetCore.Server.Kestrel>
System.MissingMethodException: Method not found: ‘Couchbase.Core.IBucket Couchbase.Extensions.DependencyInjection.INamedBucketProvider.GetBucket()’
at Couchbase.Extensions.Caching.CouchbaseCache…ctor(ICouchbaseCacheBucketProvider provider, IOptions`1 options)

Here is my sample code from Startup.cs

services.AddCouchbase(options =>
                .WithCredentials("username", "pwd");
            .AddDistributedCouchbaseCache("sessionstore", options => { });

I installed following packages

I noticed that INamedBucketProvider doesn’t have GetBucket method. Instead it has GetBucketAsync. So, I am wondering whether there is any package incompatibility.

I resolved this issue by downgrading the CouchbaseNetClient to SDK 2.7.22.

Yes, that version of the cache provider is not compatible with the new SDK 3. Work is in progress to make it compatible, you can build from source in GitHub if you need SDK 3 compatibility now.