Dependency Injection dotnet core 2.0

Does Couchbase.Extensions.DependencyInjection ver 1.0.2 supports dotnet core 2.0?

I’m trying to merge an application from asp .net core 1.1 to 2.0

But it doesn’t seem to work, I’m getting error message

indent preformatted text by 4 spaces


 Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[0]`Preformatted text`
  An unhandled exception has occurred while executing the request
System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at Couchbase.Authentication.AuthenticatorExtensions.GetCredentials(IAuthenticator authenticator, AuthContext 
context, String bucketName)
at Couchbase.Core.ClusterController.ResolveCredentials(String bucketName, String password, IAuthenticator 
authenticator)
at Couchbase.Core.ClusterController.CreateBucket(String bucketName, String password, IAuthenticator 
authenticator)
at Couchbase.Extensions.DependencyInjection.Internal.BucketProvider.<>c__DisplayClass5_0.
<GetBucket>b__0(String name)

@alanchang87

Dependency injection is working fine for me in a .NET Core 2.0 project. I think your problem might be something other than the DependencyInjection library, as the errors appear to be in authenticating with the cluster.

What Couchbase SDK version are you using, and what version of Couchbase Server? My working example is running with SDK 2.5.0 against Couchbase Server 5.0 Beta 2 in Docker containers running Linux.