From 61947bb026de807697d7b68707e57547d87e08ce Mon Sep 17 00:00:00 2001 From: Bart Koelman Date: Wed, 16 Feb 2022 22:47:39 +0100 Subject: [PATCH 1/3] Added workaround for bug in EF Core 6.0.2 --- Directory.Build.props | 2 +- src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 81503b5f37..36c9ede075 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ net6.0 6.0.* - 6.0.1 + 6.0.* 6.0.* 4.* 2.* diff --git a/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs b/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs index aa7ed0d434..eda6374acf 100644 --- a/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs +++ b/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs @@ -102,6 +102,12 @@ public sealed class JsonApiOptions : IJsonApiOptions } }; + static JsonApiOptions() + { + // Bug workaround for https://github.com/dotnet/efcore/issues/27436 + AppContext.SetSwitch("Microsoft.EntityFrameworkCore.Issue26779", true); + } + public JsonApiOptions() { _lazySerializerReadOptions = new Lazy(() => new JsonSerializerOptions(SerializerOptions), LazyThreadSafetyMode.PublicationOnly); From 33c4e7780fd6a1b2b56d8d354c8bd246c6cd19de Mon Sep 17 00:00:00 2001 From: Bart Koelman Date: Wed, 16 Feb 2022 23:37:06 +0100 Subject: [PATCH 2/3] Package updates --- Directory.Build.props | 4 ++-- test/TestBuildingBlocks/TestBuildingBlocks.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 36c9ede075..9e08bf30ae 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -29,8 +29,8 @@ - 3.1.0 + 3.1.2 4.16.1 - 17.0.0 + 17.1.0 diff --git a/test/TestBuildingBlocks/TestBuildingBlocks.csproj b/test/TestBuildingBlocks/TestBuildingBlocks.csproj index 2c8fdd1cd5..5b3d041185 100644 --- a/test/TestBuildingBlocks/TestBuildingBlocks.csproj +++ b/test/TestBuildingBlocks/TestBuildingBlocks.csproj @@ -10,7 +10,7 @@ - + From bdc8f76feb693405ec3f9cf2e0ed3ea04344eb22 Mon Sep 17 00:00:00 2001 From: Bart Koelman Date: Wed, 16 Feb 2022 23:49:01 +0100 Subject: [PATCH 3/3] Downgrade Microsoft.CodeAnalysis to fix cibuild --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 9e08bf30ae..66d90258f9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ 6.0.* 6.0.* 6.0.* - 4.* + 4.0.* 2.* 5.0.0 $(MSBuildThisFileDirectory)CodingGuidelines.ruleset