Serialization problems with version 2.19+

Seems like your app is trying to add the serializer twice. You could use this line

BsonSerializer.TryRegisterSerializer(objectSerializer);

instead of

BsonSerializer.RegisterSerializer(objectSerializer);