diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fa3c664..6697e17 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -7,7 +7,7 @@ on:
branches: [ "main" ]
jobs:
- test:
+ test-net8:
runs-on: ubuntu-latest
container: mcr.microsoft.com/dotnet/sdk:8.0
@@ -15,7 +15,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Build
- run: ./build.sh
+ run: ./build.sh net8.0
- name: Test
- run: ./test.sh
+ run: ./test.sh net8.0
+
+ test-net9:
+ runs-on: ubuntu-latest
+ container: mcr.microsoft.com/dotnet/sdk:9.0
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Build
+ run: ./build.sh net9.0
+ - name: Test
+ run: ./test.sh net9.0
diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml
index 0feb310..124a3e3 100644
--- a/.github/workflows/pack.yml
+++ b/.github/workflows/pack.yml
@@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
- dotnet-version: '8'
+ dotnet-version: '9'
- name: Nuget Push
env:
nuget_key: ${{ secrets.NUGETAPIKEY }}
diff --git a/Directory.Build.props b/Directory.Build.props
index e620c99..5b2e9d9 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,7 +1,7 @@
- net8.0
+ net8.0;net9.0
enable
enable
Cnblogs
diff --git a/build.sh b/build.sh
index 3b38df0..6908b50 100755
--- a/build.sh
+++ b/build.sh
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -e
-dotnet restore
-dotnet build -c Release
+dotnet restore -p:TargetFramework="$1"
+dotnet build -c Release -p:TargetFramework="$1" --no-restore
diff --git a/src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/Cnblogs.Architecture.Ddd.Cqrs.Abstractions.csproj b/src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/Cnblogs.Architecture.Ddd.Cqrs.Abstractions.csproj
index a3d6d3e..1113372 100644
--- a/src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/Cnblogs.Architecture.Ddd.Cqrs.Abstractions.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/Cnblogs.Architecture.Ddd.Cqrs.Abstractions.csproj
@@ -17,8 +17,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore.csproj b/src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore.csproj
index 9069513..7dbbbcf 100644
--- a/src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore.csproj
@@ -8,9 +8,17 @@
-
+
+
+
+
+
+
+
+
+
diff --git a/src/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent.csproj b/src/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent.csproj
index 0abf125..090e93e 100644
--- a/src/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent.csproj
@@ -9,8 +9,16 @@
+
+
+
+
+
+
+
+
CqrsHeaderNames.cs
diff --git a/src/Cnblogs.Architecture.Ddd.Infrastructure.CacheProviders.InMemory/Cnblogs.Architecture.Ddd.Infrastructure.CacheProviders.InMemory.csproj b/src/Cnblogs.Architecture.Ddd.Infrastructure.CacheProviders.InMemory/Cnblogs.Architecture.Ddd.Infrastructure.CacheProviders.InMemory.csproj
index 95e0ed4..32e6024 100644
--- a/src/Cnblogs.Architecture.Ddd.Infrastructure.CacheProviders.InMemory/Cnblogs.Architecture.Ddd.Infrastructure.CacheProviders.InMemory.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Infrastructure.CacheProviders.InMemory/Cnblogs.Architecture.Ddd.Infrastructure.CacheProviders.InMemory.csproj
@@ -7,12 +7,17 @@
-
-
+
+
-
-
+
+
+
+
+
+
+
diff --git a/src/Cnblogs.Architecture.Ddd.Infrastructure.Dapper/Cnblogs.Architecture.Ddd.Infrastructure.Dapper.csproj b/src/Cnblogs.Architecture.Ddd.Infrastructure.Dapper/Cnblogs.Architecture.Ddd.Infrastructure.Dapper.csproj
index 922a3e0..9be1738 100644
--- a/src/Cnblogs.Architecture.Ddd.Infrastructure.Dapper/Cnblogs.Architecture.Ddd.Infrastructure.Dapper.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Infrastructure.Dapper/Cnblogs.Architecture.Ddd.Infrastructure.Dapper.csproj
@@ -10,7 +10,14 @@
+
+
+
+
+
+
+
diff --git a/src/Cnblogs.Architecture.Ddd.Infrastructure.EntityFramework/Cnblogs.Architecture.Ddd.Infrastructure.EntityFramework.csproj b/src/Cnblogs.Architecture.Ddd.Infrastructure.EntityFramework/Cnblogs.Architecture.Ddd.Infrastructure.EntityFramework.csproj
index c86356a..dca9848 100644
--- a/src/Cnblogs.Architecture.Ddd.Infrastructure.EntityFramework/Cnblogs.Architecture.Ddd.Infrastructure.EntityFramework.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Infrastructure.EntityFramework/Cnblogs.Architecture.Ddd.Infrastructure.EntityFramework.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/test.sh b/test.sh
index 651757d..4c41aad 100755
--- a/test.sh
+++ b/test.sh
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
set -e
-dotnet test -c Release
+dotnet test -c Release -f "$1" --no-build --no-restore
diff --git a/test/Cnblogs.Architecture.IntegrationTestProject/Cnblogs.Architecture.IntegrationTestProject.csproj b/test/Cnblogs.Architecture.IntegrationTestProject/Cnblogs.Architecture.IntegrationTestProject.csproj
index a8e0376..9c4c9b5 100644
--- a/test/Cnblogs.Architecture.IntegrationTestProject/Cnblogs.Architecture.IntegrationTestProject.csproj
+++ b/test/Cnblogs.Architecture.IntegrationTestProject/Cnblogs.Architecture.IntegrationTestProject.csproj
@@ -1,9 +1,5 @@
-
-
-
-
diff --git a/test/Cnblogs.Architecture.IntegrationTestProject/Program.cs b/test/Cnblogs.Architecture.IntegrationTestProject/Program.cs
index 45aef48..fed4166 100644
--- a/test/Cnblogs.Architecture.IntegrationTestProject/Program.cs
+++ b/test/Cnblogs.Architecture.IntegrationTestProject/Program.cs
@@ -19,17 +19,9 @@
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddCnblogsApiVersioning();
-builder.Services.AddSwaggerGen();
var app = builder.Build();
-// Configure the HTTP request pipeline.
-if (app.Environment.IsDevelopment())
-{
- app.UseSwagger();
- app.UseSwaggerUI();
-}
-
app.UseAuthorization();
app.MapControllers();
diff --git a/test/Cnblogs.Architecture.IntegrationTests/Cnblogs.Architecture.IntegrationTests.csproj b/test/Cnblogs.Architecture.IntegrationTests/Cnblogs.Architecture.IntegrationTests.csproj
index ddc8f48..685c378 100644
--- a/test/Cnblogs.Architecture.IntegrationTests/Cnblogs.Architecture.IntegrationTests.csproj
+++ b/test/Cnblogs.Architecture.IntegrationTests/Cnblogs.Architecture.IntegrationTests.csproj
@@ -1,7 +1,6 @@
-
@@ -14,6 +13,13 @@
+
+
+
+
+
+
+
@@ -22,7 +28,7 @@
-
+
diff --git a/test/Cnblogs.Architecture.TestShared/Cnblogs.Architecture.TestShared.csproj b/test/Cnblogs.Architecture.TestShared/Cnblogs.Architecture.TestShared.csproj
index 9f010e2..e633a27 100644
--- a/test/Cnblogs.Architecture.TestShared/Cnblogs.Architecture.TestShared.csproj
+++ b/test/Cnblogs.Architecture.TestShared/Cnblogs.Architecture.TestShared.csproj
@@ -1,6 +1,6 @@
-
-
+
+
\ No newline at end of file
diff --git a/test/Cnblogs.Architecture.UnitTests/Cnblogs.Architecture.UnitTests.csproj b/test/Cnblogs.Architecture.UnitTests/Cnblogs.Architecture.UnitTests.csproj
index 1e6dabb..3880bba 100644
--- a/test/Cnblogs.Architecture.UnitTests/Cnblogs.Architecture.UnitTests.csproj
+++ b/test/Cnblogs.Architecture.UnitTests/Cnblogs.Architecture.UnitTests.csproj
@@ -1,7 +1,7 @@
-
+