Seems like your app is trying to add the serializer twice. You could use this line
BsonSerializer.TryRegisterSerializer(objectSerializer);
instead of
BsonSerializer.RegisterSerializer(objectSerializer);
Seems like your app is trying to add the serializer twice. You could use this line
BsonSerializer.TryRegisterSerializer(objectSerializer);
instead of
BsonSerializer.RegisterSerializer(objectSerializer);