Skip to content

Commit e319d90

Browse files
author
Bart Koelman
committed
Added workaround for bug in EF Core 6.0.2 (#1139)
* Added workaround for bug in EF Core 6.0.2 * Package updates * Downgrade Microsoft.CodeAnalysis to fix cibuild
1 parent d82e695 commit e319d90

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

Directory.Build.props

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<PropertyGroup>
33
<TargetFrameworkName>net6.0</TargetFrameworkName>
44
<AspNetVersion>6.0.*</AspNetVersion>
5-
<EFCoreVersion>6.0.1</EFCoreVersion>
5+
<EFCoreVersion>6.0.*</EFCoreVersion>
66
<EFCorePostgresVersion>6.0.*</EFCorePostgresVersion>
7-
<MicrosoftCodeAnalysisVersion>4.*</MicrosoftCodeAnalysisVersion>
7+
<MicrosoftCodeAnalysisVersion>4.0.*</MicrosoftCodeAnalysisVersion>
88
<HumanizerVersion>2.*</HumanizerVersion>
99
<JsonApiDotNetCoreVersionPrefix>5.0.0</JsonApiDotNetCoreVersionPrefix>
1010
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodingGuidelines.ruleset</CodeAnalysisRuleSet>
@@ -29,8 +29,8 @@
2929

3030
<!-- Test Project Dependencies -->
3131
<PropertyGroup>
32-
<CoverletVersion>3.1.0</CoverletVersion>
32+
<CoverletVersion>3.1.2</CoverletVersion>
3333
<MoqVersion>4.16.1</MoqVersion>
34-
<TestSdkVersion>17.0.0</TestSdkVersion>
34+
<TestSdkVersion>17.1.0</TestSdkVersion>
3535
</PropertyGroup>
3636
</Project>

src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs

+6
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ public sealed class JsonApiOptions : IJsonApiOptions
102102
}
103103
};
104104

105+
static JsonApiOptions()
106+
{
107+
// Bug workaround for https://github.com/dotnet/efcore/issues/27436
108+
AppContext.SetSwitch("Microsoft.EntityFrameworkCore.Issue26779", true);
109+
}
110+
105111
public JsonApiOptions()
106112
{
107113
_lazySerializerReadOptions = new Lazy<JsonSerializerOptions>(() => new JsonSerializerOptions(SerializerOptions), LazyThreadSafetyMode.PublicationOnly);

test/TestBuildingBlocks/TestBuildingBlocks.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<ItemGroup>
1111
<PackageReference Include="Bogus" Version="34.0.1" />
1212
<PackageReference Include="coverlet.collector" Version="$(CoverletVersion)" PrivateAssets="All" />
13-
<PackageReference Include="FluentAssertions" Version="6.2.0" />
13+
<PackageReference Include="FluentAssertions" Version="6.3.0" />
1414
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="$(AspNetVersion)" />
1515
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="$(AspNetVersion)" />
1616
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />

0 commit comments

Comments
 (0)