I'm attempting to integrate AspNetCore.Identity.MongoDbCore into my application. However, upon running the application, I encounter the following error:
System.MissingMethodException: 'Method not found: 'Void MongoDB.Bson.BsonDefaults.set_GuidRepresentationMode(MongoDB.Bson.GuidRepresentationMode)'.'
Here is the relevant portion of my code:
builder.Services.AddIdentityCore<ApplicationUser>()
.AddRoles<MongoIdentityRole>()
.AddMongoDbStores<ApplicationUser, MongoIdentityRole, Guid>(connectionUri, "databasename")
.AddSignInManager()
.AddDefaultTokenProviders();
Could anyone advise on how to resolve this issue or what might be causing it?
.net8/AspNetCore.Identity.MongoDbCore 6.0/MongoDbDriver 3.3.0