diff --git a/src/NStore.Core.Tests/NStore.Core.Tests.csproj b/src/NStore.Core.Tests/NStore.Core.Tests.csproj index 08f379d3..30c3fac6 100644 --- a/src/NStore.Core.Tests/NStore.Core.Tests.csproj +++ b/src/NStore.Core.Tests/NStore.Core.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/NStore.Domain.Tests/NStore.Domain.Tests.csproj b/src/NStore.Domain.Tests/NStore.Domain.Tests.csproj index ec67d3f4..0d808aeb 100644 --- a/src/NStore.Domain.Tests/NStore.Domain.Tests.csproj +++ b/src/NStore.Domain.Tests/NStore.Domain.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/NStore.Persistence.LiteDB.Tests/NStore.Persistence.LiteDB.Tests.csproj b/src/NStore.Persistence.LiteDB.Tests/NStore.Persistence.LiteDB.Tests.csproj index d766e362..26895d19 100644 --- a/src/NStore.Persistence.LiteDB.Tests/NStore.Persistence.LiteDB.Tests.csproj +++ b/src/NStore.Persistence.LiteDB.Tests/NStore.Persistence.LiteDB.Tests.csproj @@ -27,7 +27,7 @@ - + diff --git a/src/NStore.Persistence.LiteDB/NStore.Persistence.LiteDB.csproj b/src/NStore.Persistence.LiteDB/NStore.Persistence.LiteDB.csproj index 89879878..c5a4f120 100644 --- a/src/NStore.Persistence.LiteDB/NStore.Persistence.LiteDB.csproj +++ b/src/NStore.Persistence.LiteDB/NStore.Persistence.LiteDB.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/NStore.Persistence.Mongo.Tests/MongoPersistenceFixture.cs b/src/NStore.Persistence.Mongo.Tests/MongoPersistenceFixture.cs index b4518480..f0b2960d 100644 --- a/src/NStore.Persistence.Mongo.Tests/MongoPersistenceFixture.cs +++ b/src/NStore.Persistence.Mongo.Tests/MongoPersistenceFixture.cs @@ -1,6 +1,8 @@ using System; using System.Reflection; using System.Threading; +using MongoDB.Bson.Serialization; +using MongoDB.Bson.Serialization.Serializers; using MongoDB.Driver; using NStore.Core.Persistence; using NStore.Persistence.Mongo; @@ -23,6 +25,13 @@ public partial class BasePersistenceTest private MongoPersistenceOptions _options; private const string TestSuitePrefix = "Mongo"; + static BasePersistenceTest() + { + // https://github.com/mongodb/mongo-csharp-driver/releases/tag/v2.19.0 + var objectSerializer = new ObjectSerializer(type => ObjectSerializer.AllAllowedTypes(type)); + BsonSerializer.RegisterSerializer(objectSerializer); + } + #if MAP_DOMAIN static BasePersistenceTest() { diff --git a/src/NStore.Persistence.Mongo.Tests/NStore.Persistence.Mongo.Tests.csproj b/src/NStore.Persistence.Mongo.Tests/NStore.Persistence.Mongo.Tests.csproj index be7f5569..ef351b09 100644 --- a/src/NStore.Persistence.Mongo.Tests/NStore.Persistence.Mongo.Tests.csproj +++ b/src/NStore.Persistence.Mongo.Tests/NStore.Persistence.Mongo.Tests.csproj @@ -29,7 +29,7 @@ - + diff --git a/src/NStore.Persistence.Mongo/NStore.Persistence.Mongo.csproj b/src/NStore.Persistence.Mongo/NStore.Persistence.Mongo.csproj index 9bbeed23..ce1edcec 100644 --- a/src/NStore.Persistence.Mongo/NStore.Persistence.Mongo.csproj +++ b/src/NStore.Persistence.Mongo/NStore.Persistence.Mongo.csproj @@ -13,7 +13,7 @@ true - + diff --git a/src/NStore.Persistence.MsSql.Tests/NStore.Persistence.MsSql.Tests.csproj b/src/NStore.Persistence.MsSql.Tests/NStore.Persistence.MsSql.Tests.csproj index a7554161..ec51edce 100644 --- a/src/NStore.Persistence.MsSql.Tests/NStore.Persistence.MsSql.Tests.csproj +++ b/src/NStore.Persistence.MsSql.Tests/NStore.Persistence.MsSql.Tests.csproj @@ -32,7 +32,7 @@ - + all diff --git a/src/NStore.Persistence.Sqlite.Tests/NStore.Persistence.Sqlite.Tests.csproj b/src/NStore.Persistence.Sqlite.Tests/NStore.Persistence.Sqlite.Tests.csproj index 6c65c0eb..ab1ee9d7 100644 --- a/src/NStore.Persistence.Sqlite.Tests/NStore.Persistence.Sqlite.Tests.csproj +++ b/src/NStore.Persistence.Sqlite.Tests/NStore.Persistence.Sqlite.Tests.csproj @@ -31,11 +31,11 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/NStore.Persistence.Tests/NStore.Persistence.Tests.csproj b/src/NStore.Persistence.Tests/NStore.Persistence.Tests.csproj index 4dd9ac84..5a27b44d 100644 --- a/src/NStore.Persistence.Tests/NStore.Persistence.Tests.csproj +++ b/src/NStore.Persistence.Tests/NStore.Persistence.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/NStore.Quickstart/NStore.Quickstart.csproj b/src/NStore.Quickstart/NStore.Quickstart.csproj index cea4b19c..7d373873 100644 --- a/src/NStore.Quickstart/NStore.Quickstart.csproj +++ b/src/NStore.Quickstart/NStore.Quickstart.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/NStore.Sample.Tests/NStore.Sample.Tests.csproj b/src/NStore.Sample.Tests/NStore.Sample.Tests.csproj index d5579a07..acf0568c 100644 --- a/src/NStore.Sample.Tests/NStore.Sample.Tests.csproj +++ b/src/NStore.Sample.Tests/NStore.Sample.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/NStore.Sample/NStore.Sample.csproj b/src/NStore.Sample/NStore.Sample.csproj index 4b3ade01..622495c1 100644 --- a/src/NStore.Sample/NStore.Sample.csproj +++ b/src/NStore.Sample/NStore.Sample.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/NStore.Tutorial/NStore.Tutorial.csproj b/src/NStore.Tutorial/NStore.Tutorial.csproj index 4b945591..c11ec9d2 100644 --- a/src/NStore.Tutorial/NStore.Tutorial.csproj +++ b/src/NStore.Tutorial/NStore.Tutorial.csproj @@ -16,7 +16,7 @@ - +