diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 9014d5b033..8bbf38ed36 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "jetbrains.resharper.globaltools": { - "version": "2024.2.7", + "version": "2024.3.0", "commands": [ "jb" ], diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da0993c185..8a8437e9aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,6 +48,7 @@ jobs: dotnet-version: | 6.0.x 8.0.x + 9.0.x - name: Show installed versions shell: pwsh run: | @@ -166,6 +167,7 @@ jobs: dotnet-version: | 6.0.x 8.0.x + 9.0.x - name: Git checkout uses: actions/checkout@v4 - name: Restore tools @@ -221,6 +223,7 @@ jobs: dotnet-version: | 6.0.x 8.0.x + 9.0.x - name: Git checkout uses: actions/checkout@v4 with: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index eb0375769e..5abd2b1dc0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -29,6 +29,7 @@ jobs: dotnet-version: | 6.0.x 8.0.x + 9.0.x - name: Git checkout uses: actions/checkout@v4 - name: Initialize CodeQL diff --git a/Directory.Build.props b/Directory.Build.props index 6c68a15073..292bbd51ac 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -24,6 +24,12 @@ $(NoWarn);$(UseCollectionExpressionRules) + + + direct + $(NoWarn);NU5104;NU1608 + + $(NoWarn);AV2210 diff --git a/NuGet.config b/NuGet.config new file mode 100644 index 0000000000..53343a29c6 --- /dev/null +++ b/NuGet.config @@ -0,0 +1,8 @@ + + + + + + + diff --git a/benchmarks/Benchmarks.csproj b/benchmarks/Benchmarks.csproj index 9dbb9ba093..90d53461d2 100644 --- a/benchmarks/Benchmarks.csproj +++ b/benchmarks/Benchmarks.csproj @@ -1,7 +1,7 @@ Exe - net8.0 + net9.0 true diff --git a/package-versions.props b/package-versions.props index ed9b06b1aa..1fbbe82cb2 100644 --- a/package-versions.props +++ b/package-versions.props @@ -20,6 +20,17 @@ 2.8.* + + + 9.0.0 + + + 9.0.* + 9.0.* + 9.0.0-* + $(AspNetCoreVersion) + + 8.0.0 @@ -27,6 +38,7 @@ 8.0.* 8.0.* + $(EntityFrameworkCoreVersion) $(AspNetCoreVersion) @@ -38,6 +50,7 @@ 6.0.* 2.1.* 7.0.* + $(EntityFrameworkCoreVersion) 8.0.* diff --git a/src/Examples/DapperExample/DapperExample.csproj b/src/Examples/DapperExample/DapperExample.csproj index f49c3e4b40..f0150c48e1 100644 --- a/src/Examples/DapperExample/DapperExample.csproj +++ b/src/Examples/DapperExample/DapperExample.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 @@ -16,6 +16,11 @@ - + + + + + + diff --git a/src/Examples/DapperExample/Program.cs b/src/Examples/DapperExample/Program.cs index f7bf198af9..31e5814e5b 100644 --- a/src/Examples/DapperExample/Program.cs +++ b/src/Examples/DapperExample/Program.cs @@ -31,8 +31,13 @@ } case DatabaseProvider.MySql: { - builder.Services.AddMySql(connectionString, ServerVersion.AutoDetect(connectionString), - optionsAction: options => SetDbContextDebugOptions(options)); +#if NET9_0_OR_GREATER + ServerVersion serverVersion = await ServerVersion.AutoDetectAsync(connectionString); +#else + ServerVersion serverVersion = ServerVersion.AutoDetect(connectionString); +#endif + + builder.Services.AddMySql(connectionString, serverVersion, optionsAction: options => SetDbContextDebugOptions(options)); break; } diff --git a/src/Examples/DatabasePerTenantExample/DatabasePerTenantExample.csproj b/src/Examples/DatabasePerTenantExample/DatabasePerTenantExample.csproj index 0ccb4bbc5f..a22b938ba0 100644 --- a/src/Examples/DatabasePerTenantExample/DatabasePerTenantExample.csproj +++ b/src/Examples/DatabasePerTenantExample/DatabasePerTenantExample.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/src/Examples/GettingStarted/GettingStarted.csproj b/src/Examples/GettingStarted/GettingStarted.csproj index 1f4645f323..22fc0529b1 100644 --- a/src/Examples/GettingStarted/GettingStarted.csproj +++ b/src/Examples/GettingStarted/GettingStarted.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj index 0ccb4bbc5f..a22b938ba0 100644 --- a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj +++ b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/src/Examples/MultiDbContextExample/MultiDbContextExample.csproj b/src/Examples/MultiDbContextExample/MultiDbContextExample.csproj index 1f4645f323..22fc0529b1 100644 --- a/src/Examples/MultiDbContextExample/MultiDbContextExample.csproj +++ b/src/Examples/MultiDbContextExample/MultiDbContextExample.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj b/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj index c5b18320f0..c45552dc2d 100644 --- a/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj +++ b/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/src/Examples/ReportsExample/ReportsExample.csproj b/src/Examples/ReportsExample/ReportsExample.csproj index bff4909317..3f2c288b23 100644 --- a/src/Examples/ReportsExample/ReportsExample.csproj +++ b/src/Examples/ReportsExample/ReportsExample.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/src/JsonApiDotNetCore.Annotations/JsonApiDotNetCore.Annotations.csproj b/src/JsonApiDotNetCore.Annotations/JsonApiDotNetCore.Annotations.csproj index 04238621da..3ee7f4d420 100644 --- a/src/JsonApiDotNetCore.Annotations/JsonApiDotNetCore.Annotations.csproj +++ b/src/JsonApiDotNetCore.Annotations/JsonApiDotNetCore.Annotations.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0;netstandard1.0 + net9.0;net8.0;net6.0;netstandard2.0 true true JsonApiDotNetCore @@ -31,17 +31,17 @@ - + - + - + diff --git a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj index 0f395511a7..b6fdb6e8e3 100644 --- a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj +++ b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 true true diff --git a/test/AnnotationTests/AnnotationTests.csproj b/test/AnnotationTests/AnnotationTests.csproj index 081046adb0..7c5e5f3ae0 100644 --- a/test/AnnotationTests/AnnotationTests.csproj +++ b/test/AnnotationTests/AnnotationTests.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0;netstandard2.0 + net9.0;net8.0;net6.0;netstandard2.0 diff --git a/test/DapperTests/DapperTests.csproj b/test/DapperTests/DapperTests.csproj index 45d9c6a88d..1420e0dd60 100644 --- a/test/DapperTests/DapperTests.csproj +++ b/test/DapperTests/DapperTests.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/test/DiscoveryTests/DiscoveryTests.csproj b/test/DiscoveryTests/DiscoveryTests.csproj index a64d3be689..295d5340fa 100644 --- a/test/DiscoveryTests/DiscoveryTests.csproj +++ b/test/DiscoveryTests/DiscoveryTests.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/test/JsonApiDotNetCoreTests/JsonApiDotNetCoreTests.csproj b/test/JsonApiDotNetCoreTests/JsonApiDotNetCoreTests.csproj index 38d665aa5b..95a623d0f9 100644 --- a/test/JsonApiDotNetCoreTests/JsonApiDotNetCoreTests.csproj +++ b/test/JsonApiDotNetCoreTests/JsonApiDotNetCoreTests.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/test/MultiDbContextTests/MultiDbContextTests.csproj b/test/MultiDbContextTests/MultiDbContextTests.csproj index 54497bfada..6466d8d75f 100644 --- a/test/MultiDbContextTests/MultiDbContextTests.csproj +++ b/test/MultiDbContextTests/MultiDbContextTests.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj b/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj index 080666d491..968d798be3 100644 --- a/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj +++ b/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/test/SourceGeneratorTests/SourceGeneratorTests.csproj b/test/SourceGeneratorTests/SourceGeneratorTests.csproj index e28bdc20d1..8b7d42fdca 100644 --- a/test/SourceGeneratorTests/SourceGeneratorTests.csproj +++ b/test/SourceGeneratorTests/SourceGeneratorTests.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/test/TestBuildingBlocks/CapturingLoggerProvider.cs b/test/TestBuildingBlocks/CapturingLoggerProvider.cs index 3996b1c9e2..38ec60ed3a 100644 --- a/test/TestBuildingBlocks/CapturingLoggerProvider.cs +++ b/test/TestBuildingBlocks/CapturingLoggerProvider.cs @@ -10,7 +10,11 @@ public sealed class CapturingLoggerProvider : ILoggerProvider private static readonly Func DefaultFilter = (_, _) => true; private readonly Func _filter; +#if NET9_0_OR_GREATER + private readonly Lock _lockObject = new(); +#else private readonly object _lockObject = new(); +#endif private readonly List _messages = []; public CapturingLoggerProvider() diff --git a/test/TestBuildingBlocks/TestBuildingBlocks.csproj b/test/TestBuildingBlocks/TestBuildingBlocks.csproj index 40e10eb297..a6f6ff4299 100644 --- a/test/TestBuildingBlocks/TestBuildingBlocks.csproj +++ b/test/TestBuildingBlocks/TestBuildingBlocks.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 diff --git a/test/UnitTests/UnitTests.csproj b/test/UnitTests/UnitTests.csproj index 99fc7ce781..e977ac0c8c 100644 --- a/test/UnitTests/UnitTests.csproj +++ b/test/UnitTests/UnitTests.csproj @@ -1,6 +1,6 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0