diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f66450..57d134b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,13 +14,13 @@ jobs: strategy: fail-fast: false matrix: - tfm: [net8.0, net9.0, net10.0] + tfm: [net10.0, net11.0] steps: - uses: actions/checkout@v7 - name: Setup .NET uses: actions/setup-dotnet@v6 with: - dotnet-version: 10.0.x + dotnet-version: 11.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1e669cf..fe0f172 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,7 +16,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v6 with: - dotnet-version: 10.0.x + dotnet-version: 11.0.x - name: Pack run: | arrTag=(${GITHUB_REF//\// }) diff --git a/Dockerfile.integrationTests.net10 b/Dockerfile.integrationTests.net10 index 3525eb5..86564ee 100644 --- a/Dockerfile.integrationTests.net10 +++ b/Dockerfile.integrationTests.net10 @@ -7,7 +7,7 @@ COPY ./tests/PostgreSignalR.IntegrationTests.Abstractions ./tests/PostgreSignalR COPY ./tests/PostgreSignalR.IntegrationTests.App ./tests/PostgreSignalR.IntegrationTests.App WORKDIR /work/tests/PostgreSignalR.IntegrationTests.App -RUN dotnet publish -c Release -o /app/publish --framework net10.0 --no-cache +RUN dotnet publish -c Release -o /app/publish --framework net10.0 -p:TargetFrameworks=net10.0 --no-cache # Runtime Stage FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final diff --git a/Dockerfile.integrationTests.net8 b/Dockerfile.integrationTests.net11 similarity index 69% rename from Dockerfile.integrationTests.net8 rename to Dockerfile.integrationTests.net11 index 60e0993..f690a8b 100644 --- a/Dockerfile.integrationTests.net8 +++ b/Dockerfile.integrationTests.net11 @@ -1,5 +1,5 @@ # Build Stage -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build WORKDIR /work COPY ./src ./src @@ -7,10 +7,10 @@ COPY ./tests/PostgreSignalR.IntegrationTests.Abstractions ./tests/PostgreSignalR COPY ./tests/PostgreSignalR.IntegrationTests.App ./tests/PostgreSignalR.IntegrationTests.App WORKDIR /work/tests/PostgreSignalR.IntegrationTests.App -RUN dotnet publish -c Release -o /app/publish --framework net8.0 --no-cache +RUN dotnet publish -c Release -o /app/publish --framework net11.0 --no-cache # Runtime Stage -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final +FROM mcr.microsoft.com/dotnet/aspnet:11.0 AS final WORKDIR /app COPY --from=build /app/publish ./ diff --git a/Dockerfile.integrationTests.net9 b/Dockerfile.integrationTests.net9 deleted file mode 100644 index fee7e27..0000000 --- a/Dockerfile.integrationTests.net9 +++ /dev/null @@ -1,18 +0,0 @@ -# Build Stage -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build -WORKDIR /work - -COPY ./src ./src -COPY ./tests/PostgreSignalR.IntegrationTests.Abstractions ./tests/PostgreSignalR.IntegrationTests.Abstractions -COPY ./tests/PostgreSignalR.IntegrationTests.App ./tests/PostgreSignalR.IntegrationTests.App - -WORKDIR /work/tests/PostgreSignalR.IntegrationTests.App -RUN dotnet publish -c Release -o /app/publish --framework net9.0 --no-cache - -# Runtime Stage -FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS final -WORKDIR /app -COPY --from=build /app/publish ./ - -EXPOSE 8080 -ENTRYPOINT ["dotnet", "PostgreSignalR.IntegrationTests.App.dll"] diff --git a/README.md b/README.md index a3a5823..30788b9 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This is great, but what if [I really like Postgres](https://ian.wold.guru/Posts/ # Getting Started -Setting up the Postgres backplane for SignalR is very simple. If you've configured the [official Redis backplane](https://learn.microsoft.com/en-us/aspnet/core/signalr/redis-backplane?view=aspnetcore-10.0) before these steps will be quite simple. +Setting up the Postgres backplane for SignalR is very simple. If you've configured the [official Redis backplane](https://learn.microsoft.com/en-us/aspnet/core/signalr/redis-backplane?view=aspnetcore-11.0) before these steps will be quite simple. 1. You'll need a Postgres server of course; deploy a new one or use your existing database 2. Install the [PostgreSignalR Nuget package](https://www.nuget.org/packages/PostgreSignalR) in your server project @@ -279,7 +279,7 @@ public async Task Test() ### Building and Testing Locally -To build, all you'll need is [the .NET 10 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/10.0). If you're interested in setting up a separate local project to use your development version of this library, you can follow [Microsoft's guide on local Nuget feeds](https://learn.microsoft.com/en-us/nuget/hosting-packages/local-feeds). +To build, all you'll need is [the .NET 11 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/11.0). If you're interested in setting up a separate local project to use your development version of this library, you can follow [Microsoft's guide on local Nuget feeds](https://learn.microsoft.com/en-us/nuget/hosting-packages/local-feeds). In order to execute the tests locally, you'll need to have Docker installed. I recommend installing [Docker Desktop](https://www.docker.com/products/docker-desktop/) for ease of use, but any Docker-compatible container engine/interface should work fine. Docker Desktop works out of the box, for the most part. Your favorite C# IDE should have a test explorer, you can run the tests like normal from there, just be sure Docker is running before you run the tests. If you're using VSCode like I am, I recommend installing [the C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit). diff --git a/README_NUGET.md b/README_NUGET.md index f63bce3..203e83f 100644 --- a/README_NUGET.md +++ b/README_NUGET.md @@ -8,7 +8,7 @@ This is great, but what if [I really like Postgres](https://ian.wold.guru/Posts/ # Getting Started -Setting up the Postgres backplane for SignalR is very simple. If you've configured the [official Redis backplane](https://learn.microsoft.com/en-us/aspnet/core/signalr/redis-backplane?view=aspnetcore-10.0) before these steps will be quite simple. +Setting up the Postgres backplane for SignalR is very simple. If you've configured the [official Redis backplane](https://learn.microsoft.com/en-us/aspnet/core/signalr/redis-backplane?view=aspnetcore-11.0) before these steps will be quite simple. 1. You'll need a Postgres server of course; deploy a new one or use your exisitng database 2. Install the [PostgreSignalR Nuget package](https://www.nuget.org/packages/PostgreSignalR) in your server project @@ -122,7 +122,7 @@ public async Task Test() ### Building and Testing Locally -To build, all you'll need is [the .NET 10 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/10.0). If you're interested in setting up a separate local project to use your development version of this library, you can follow [Microsoft's guide on local Nuget feeds](https://learn.microsoft.com/en-us/nuget/hosting-packages/local-feeds). +To build, all you'll need is [the .NET 11 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/11.0). If you're interested in setting up a separate local project to use your development version of this library, you can follow [Microsoft's guide on local Nuget feeds](https://learn.microsoft.com/en-us/nuget/hosting-packages/local-feeds). In order to execute the tests locally, you'll need to have Docker installed. I recommend installing [Docker Desktop](https://www.docker.com/products/docker-desktop/) for ease of use, but any Docker-compatible container engine/interface should work fine. Docker Desktop works out of the box, for the most part. Your favorite C# IDE should have a test explorer, you can run the tests like normal from there, just be sure Docker is running before you run the tests. If you're using VSCode like I am, I recommend installing [the C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit). diff --git a/benchmarks/PostgreSignalR.Benchmarks.Abstractions/PostgreSignalR.Benchmarks.Abstractions.csproj b/benchmarks/PostgreSignalR.Benchmarks.Abstractions/PostgreSignalR.Benchmarks.Abstractions.csproj index 023297e..63af246 100644 --- a/benchmarks/PostgreSignalR.Benchmarks.Abstractions/PostgreSignalR.Benchmarks.Abstractions.csproj +++ b/benchmarks/PostgreSignalR.Benchmarks.Abstractions/PostgreSignalR.Benchmarks.Abstractions.csproj @@ -1,7 +1,7 @@  - net10.0 + net11.0 enable enable true diff --git a/benchmarks/PostgreSignalR.Benchmarks.Server/Dockerfile b/benchmarks/PostgreSignalR.Benchmarks.Server/Dockerfile index 4d6c2cf..e64865e 100644 --- a/benchmarks/PostgreSignalR.Benchmarks.Server/Dockerfile +++ b/benchmarks/PostgreSignalR.Benchmarks.Server/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build WORKDIR /src # Copy the rest of the source @@ -10,7 +10,7 @@ RUN dotnet restore benchmarks/PostgreSignalR.Benchmarks.Server/PostgreSignalR.Be # Publish RUN dotnet publish benchmarks/PostgreSignalR.Benchmarks.Server/PostgreSignalR.Benchmarks.Server.csproj -c Release -o /out --no-restore -FROM mcr.microsoft.com/dotnet/aspnet:10.0 +FROM mcr.microsoft.com/dotnet/aspnet:11.0 WORKDIR /app COPY --from=build /out . diff --git a/benchmarks/PostgreSignalR.Benchmarks.Server/PostgreSignalR.Benchmarks.Server.csproj b/benchmarks/PostgreSignalR.Benchmarks.Server/PostgreSignalR.Benchmarks.Server.csproj index 2e59349..77ff987 100644 --- a/benchmarks/PostgreSignalR.Benchmarks.Server/PostgreSignalR.Benchmarks.Server.csproj +++ b/benchmarks/PostgreSignalR.Benchmarks.Server/PostgreSignalR.Benchmarks.Server.csproj @@ -1,14 +1,14 @@ - net10.0 + net11.0 enable enable true - + diff --git a/benchmarks/PostgreSignalR.Benchmarks/Dockerfile b/benchmarks/PostgreSignalR.Benchmarks/Dockerfile index 2b2a313..b288ab1 100644 --- a/benchmarks/PostgreSignalR.Benchmarks/Dockerfile +++ b/benchmarks/PostgreSignalR.Benchmarks/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build WORKDIR /src # Copy the rest of the source @@ -10,7 +10,7 @@ RUN dotnet restore benchmarks/PostgreSignalR.Benchmarks/PostgreSignalR.Benchmark # Publish RUN dotnet publish benchmarks/PostgreSignalR.Benchmarks/PostgreSignalR.Benchmarks.csproj -c Release -o /out --no-restore -FROM mcr.microsoft.com/dotnet/runtime:10.0 +FROM mcr.microsoft.com/dotnet/runtime:11.0 WORKDIR /app COPY --from=build /out . diff --git a/benchmarks/PostgreSignalR.Benchmarks/PostgreSignalR.Benchmarks.csproj b/benchmarks/PostgreSignalR.Benchmarks/PostgreSignalR.Benchmarks.csproj index ea32661..fcfe822 100644 --- a/benchmarks/PostgreSignalR.Benchmarks/PostgreSignalR.Benchmarks.csproj +++ b/benchmarks/PostgreSignalR.Benchmarks/PostgreSignalR.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 enable enable true @@ -10,7 +10,7 @@ - + diff --git a/examples/PostgreSignalR.Examples.BasicSetup/PostgreSignalR.Examples.BasicSetup.csproj b/examples/PostgreSignalR.Examples.BasicSetup/PostgreSignalR.Examples.BasicSetup.csproj index 775362b..3a71cbd 100644 --- a/examples/PostgreSignalR.Examples.BasicSetup/PostgreSignalR.Examples.BasicSetup.csproj +++ b/examples/PostgreSignalR.Examples.BasicSetup/PostgreSignalR.Examples.BasicSetup.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 enable enable true diff --git a/examples/PostgreSignalR.Examples.CustomPayloadStrategy/PostgreSignalR.Examples.CustomPayloadStrategy.csproj b/examples/PostgreSignalR.Examples.CustomPayloadStrategy/PostgreSignalR.Examples.CustomPayloadStrategy.csproj index 8aeac74..dc2e2eb 100644 --- a/examples/PostgreSignalR.Examples.CustomPayloadStrategy/PostgreSignalR.Examples.CustomPayloadStrategy.csproj +++ b/examples/PostgreSignalR.Examples.CustomPayloadStrategy/PostgreSignalR.Examples.CustomPayloadStrategy.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 enable enable true diff --git a/examples/PostgreSignalR.Examples.CustomTable/PostgreSignalR.Examples.CustomTable.csproj b/examples/PostgreSignalR.Examples.CustomTable/PostgreSignalR.Examples.CustomTable.csproj index 8aeac74..dc2e2eb 100644 --- a/examples/PostgreSignalR.Examples.CustomTable/PostgreSignalR.Examples.CustomTable.csproj +++ b/examples/PostgreSignalR.Examples.CustomTable/PostgreSignalR.Examples.CustomTable.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 enable enable true diff --git a/examples/PostgreSignalR.Examples.TablePayloadSetup/PostgreSignalR.Examples.TablePayloadSetup.csproj b/examples/PostgreSignalR.Examples.TablePayloadSetup/PostgreSignalR.Examples.TablePayloadSetup.csproj index 775362b..3a71cbd 100644 --- a/examples/PostgreSignalR.Examples.TablePayloadSetup/PostgreSignalR.Examples.TablePayloadSetup.csproj +++ b/examples/PostgreSignalR.Examples.TablePayloadSetup/PostgreSignalR.Examples.TablePayloadSetup.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 enable enable true diff --git a/src/AckHandler.cs b/src/AckHandler.cs index 1012e7c..3004761 100644 --- a/src/AckHandler.cs +++ b/src/AckHandler.cs @@ -9,11 +9,7 @@ internal sealed class AckHandler : IDisposable private readonly long _ackThreshold = (long)TimeSpan.FromSeconds(30).TotalMilliseconds; private readonly TimeSpan _ackInterval = TimeSpan.FromSeconds(5); -#if NET9_0_OR_GREATER private readonly Lock _lock = new(); -#else - private readonly object _lock = new {}; -#endif private bool _disposed; diff --git a/src/PostgreSignalR.csproj b/src/PostgreSignalR.csproj index de1c4df..54feca6 100644 --- a/src/PostgreSignalR.csproj +++ b/src/PostgreSignalR.csproj @@ -1,7 +1,7 @@  - net8.0;net9.0;net10.0 + net10.0;net11.0 latest enable enable diff --git a/tests/PostgreSignalR.IntegrationTests.Abstractions/PostgreSignalR.IntegrationTests.Abstractions.csproj b/tests/PostgreSignalR.IntegrationTests.Abstractions/PostgreSignalR.IntegrationTests.Abstractions.csproj index 57f9a16..404d27b 100644 --- a/tests/PostgreSignalR.IntegrationTests.Abstractions/PostgreSignalR.IntegrationTests.Abstractions.csproj +++ b/tests/PostgreSignalR.IntegrationTests.Abstractions/PostgreSignalR.IntegrationTests.Abstractions.csproj @@ -1,7 +1,7 @@  - net8.0;net9.0;net10.0 + net10.0;net11.0 enable enable true diff --git a/tests/PostgreSignalR.IntegrationTests.App/PostgreSignalR.IntegrationTests.App.csproj b/tests/PostgreSignalR.IntegrationTests.App/PostgreSignalR.IntegrationTests.App.csproj index c52dfd1..640a02c 100644 --- a/tests/PostgreSignalR.IntegrationTests.App/PostgreSignalR.IntegrationTests.App.csproj +++ b/tests/PostgreSignalR.IntegrationTests.App/PostgreSignalR.IntegrationTests.App.csproj @@ -1,7 +1,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 enable enable true @@ -12,16 +12,12 @@ - - - - - - - - + + + + diff --git a/tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.Net8.csproj b/tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.Net11.csproj similarity index 80% rename from tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.Net8.csproj rename to tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.Net11.csproj index 1ff7168..129d734 100644 --- a/tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.Net8.csproj +++ b/tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.Net11.csproj @@ -1,7 +1,7 @@ - net8.0 + net11.0 true diff --git a/tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.Net9.csproj b/tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.Net9.csproj deleted file mode 100644 index 35daeee..0000000 --- a/tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.Net9.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - net9.0 - true - - - - - - - diff --git a/tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.csproj b/tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.csproj index a213f12..70cd990 100644 --- a/tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.csproj +++ b/tests/PostgreSignalR.IntegrationTests/PostgreSignalR.IntegrationTests.csproj @@ -1,7 +1,7 @@  - net8.0;net9.0;net10.0 + net10.0;net11.0 enable enable false @@ -22,21 +22,16 @@ - - - - - - - - - - + + + + + diff --git a/tests/PostgreSignalR.IntegrationTests/Utilities/ContainerFixture.cs b/tests/PostgreSignalR.IntegrationTests/Utilities/ContainerFixture.cs index 7f7f75f..4924b19 100644 --- a/tests/PostgreSignalR.IntegrationTests/Utilities/ContainerFixture.cs +++ b/tests/PostgreSignalR.IntegrationTests/Utilities/ContainerFixture.cs @@ -111,12 +111,10 @@ public async ValueTask InitializeAsync() TestServerImage = new ImageFromDockerfileBuilder() .WithDockerfileDirectory(CommonDirectoryPath.GetSolutionDirectory().DirectoryPath) -#if NET10_0 +#if NET11_0 + .WithDockerfile("Dockerfile.integrationTests.net11") +#elif NET10_0 .WithDockerfile("Dockerfile.integrationTests.net10") -#elif NET9_0 - .WithDockerfile("Dockerfile.integrationTests.net9") -#elif NET8_0 - .WithDockerfile("Dockerfile.integrationTests.net8") #endif .Build(); diff --git a/tests/PostgreSignalR.IntegrationTests/Utilities/TestClient.cs b/tests/PostgreSignalR.IntegrationTests/Utilities/TestClient.cs index f5a8cea..f3c46f2 100644 --- a/tests/PostgreSignalR.IntegrationTests/Utilities/TestClient.cs +++ b/tests/PostgreSignalR.IntegrationTests/Utilities/TestClient.cs @@ -12,14 +12,8 @@ public class TestClient(HubConnection connection) : IAsyncDisposable private IServer? _serverProxy; -#if NET10_0_OR_GREATER private ClientReceiver Receiver => field ??= new(ReceiverCallback); -#else - private ClientReceiver? _receiver; - private ClientReceiver Receiver => - _receiver ??= new(ReceiverCallback); -#endif public IServer Send => _serverProxy ?? throw new Exception("Not initialized!");