diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 07d13d90e..e6d1eb194 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -136,10 +136,6 @@ jobs: uses: actions/checkout@v4 with: submodules: true - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 6.x - name: Cache NuGet packages uses: actions/cache@v4 with: @@ -174,10 +170,6 @@ jobs: uses: actions/checkout@v4 with: submodules: true - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 6.x - name: Download Build (Debug) uses: actions/download-artifact@v4 with: @@ -215,10 +207,6 @@ jobs: uses: actions/checkout@v4 with: submodules: true - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 6.x - name: Download Build (Debug) uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/oauth2.yaml b/.github/workflows/oauth2.yaml index efbe4ffee..556826014 100644 --- a/.github/workflows/oauth2.yaml +++ b/.github/workflows/oauth2.yaml @@ -19,7 +19,7 @@ jobs: submodules: true - uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.x + dotnet-version: 8.x - uses: actions/cache@v4 with: path: | diff --git a/projects/Benchmarks/Benchmarks.csproj b/projects/Benchmarks/Benchmarks.csproj index 150112587..deae254f2 100644 --- a/projects/Benchmarks/Benchmarks.csproj +++ b/projects/Benchmarks/Benchmarks.csproj @@ -1,13 +1,13 @@ - net6.0;net472 + net8.0;net472 $(NoWarn);CA2007 true - net6.0 + net8.0 $(NoWarn);CA2007 true diff --git a/projects/Directory.Packages.props b/projects/Directory.Packages.props index e859bc923..1d76dcea9 100644 --- a/projects/Directory.Packages.props +++ b/projects/Directory.Packages.props @@ -14,7 +14,7 @@ Note: do NOT upgrade the System.IO.Pipelines dependency unless necessary See https://github.com/rabbitmq/rabbitmq-dotnet-client/pull/1481#pullrequestreview-1847905299 --> - + @@ -29,15 +29,15 @@ * https://github.com/rabbitmq/rabbitmq-dotnet-client/pull/1481#pullrequestreview-1847905299 * https://github.com/rabbitmq/rabbitmq-dotnet-client/pull/1594 --> - + - - - - + + + + - + diff --git a/projects/RabbitMQ.Client.OAuth2/RabbitMQ.Client.OAuth2.csproj b/projects/RabbitMQ.Client.OAuth2/RabbitMQ.Client.OAuth2.csproj index 9504ead77..305935013 100644 --- a/projects/RabbitMQ.Client.OAuth2/RabbitMQ.Client.OAuth2.csproj +++ b/projects/RabbitMQ.Client.OAuth2/RabbitMQ.Client.OAuth2.csproj @@ -1,7 +1,7 @@  - net6.0;netstandard2.0 + net8.0;netstandard2.0 $(NoWarn);CS1591 true RabbitMQ OAuth2 Client Library for .NET @@ -31,7 +31,7 @@ https://learn.microsoft.com/en-us/answers/questions/1371494/for-net-standard-2-0-library-why-add-net-core-3-1 https://devblogs.microsoft.com/dotnet/embracing-nullable-reference-types/#what-should-library-authors-do --> - 9.0 + 12.0 enable diff --git a/projects/RabbitMQ.Client.OpenTelemetry/RabbitMQ.Client.OpenTelemetry.csproj b/projects/RabbitMQ.Client.OpenTelemetry/RabbitMQ.Client.OpenTelemetry.csproj index 06fa5696f..10efe3c88 100644 --- a/projects/RabbitMQ.Client.OpenTelemetry/RabbitMQ.Client.OpenTelemetry.csproj +++ b/projects/RabbitMQ.Client.OpenTelemetry/RabbitMQ.Client.OpenTelemetry.csproj @@ -1,7 +1,7 @@  - net6.0;netstandard2.0 + net8.0;netstandard2.0 $(NoWarn);CS1591 true RabbitMQ OpenTelemetry Integration Package for .NET @@ -27,7 +27,7 @@ true ../../packages README.md - 9.0 + 12.0 diff --git a/projects/RabbitMQ.Client/Impl/SessionBase.cs b/projects/RabbitMQ.Client/Impl/SessionBase.cs index 863881efd..0e0c363ed 100644 --- a/projects/RabbitMQ.Client/Impl/SessionBase.cs +++ b/projects/RabbitMQ.Client/Impl/SessionBase.cs @@ -128,7 +128,7 @@ public virtual ValueTask TransmitAsync(in T cmd, CancellationToken cancellati ThrowAlreadyClosedException(); } - RentedMemory bytes = Framing.SerializeToFrames(ref Unsafe.AsRef(cmd), ChannelNumber); + RentedMemory bytes = Framing.SerializeToFrames(ref Unsafe.AsRef(in cmd), ChannelNumber); RabbitMQActivitySource.PopulateMessageEnvelopeSize(Activity.Current, bytes.Size); return Connection.WriteAsync(bytes, cancellationToken); } @@ -142,7 +142,7 @@ public ValueTask TransmitAsync(in TMethod cmd, in THeader head ThrowAlreadyClosedException(); } - RentedMemory bytes = Framing.SerializeToFrames(ref Unsafe.AsRef(cmd), ref Unsafe.AsRef(header), body, ChannelNumber, Connection.MaxPayloadSize); + RentedMemory bytes = Framing.SerializeToFrames(ref Unsafe.AsRef(in cmd), ref Unsafe.AsRef(in header), body, ChannelNumber, Connection.MaxPayloadSize); RabbitMQActivitySource.PopulateMessageEnvelopeSize(Activity.Current, bytes.Size); return Connection.WriteAsync(bytes, cancellationToken); } diff --git a/projects/RabbitMQ.Client/RabbitMQ.Client.csproj b/projects/RabbitMQ.Client/RabbitMQ.Client.csproj index fbcdd2122..1e7d59b92 100644 --- a/projects/RabbitMQ.Client/RabbitMQ.Client.csproj +++ b/projects/RabbitMQ.Client/RabbitMQ.Client.csproj @@ -1,10 +1,11 @@ - net6.0;netstandard2.0 + net8.0;netstandard2.0 $(NoWarn);CS1591 - true - true + + true + true RabbitMQ Client Library for .NET Broadcom Broadcom, Inc. or its subsidiaries. @@ -33,7 +34,7 @@ https://learn.microsoft.com/en-us/answers/questions/1371494/for-net-standard-2-0-library-why-add-net-core-3-1 https://devblogs.microsoft.com/dotnet/embracing-nullable-reference-types/#what-should-library-authors-do --> - 9.0 + 12.0 enable diff --git a/projects/RabbitMQ.Client/TypeExtensions.cs b/projects/RabbitMQ.Client/TypeExtensions.cs index ee1e4f916..97f913911 100644 --- a/projects/RabbitMQ.Client/TypeExtensions.cs +++ b/projects/RabbitMQ.Client/TypeExtensions.cs @@ -46,7 +46,7 @@ public static ref byte GetStart(this ReadOnlySpan span) [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ref byte GetStart(this byte[] array) { - return ref Unsafe.AsRef(array[0]); + return ref Unsafe.AsRef(in array[0]); } [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/projects/Test/Applications/CreateChannel/CreateChannel.csproj b/projects/Test/Applications/CreateChannel/CreateChannel.csproj index 2ff780b2a..ba23a90df 100644 --- a/projects/Test/Applications/CreateChannel/CreateChannel.csproj +++ b/projects/Test/Applications/CreateChannel/CreateChannel.csproj @@ -1,20 +1,20 @@ - net6.0;net472 + net8.0;net472 $(NoWarn);CA2007 true - net6.0 + net8.0 $(NoWarn);CA2007 true Exe - 9.0 + 12.0 diff --git a/projects/Test/Applications/GH-1647/GH-1647.csproj b/projects/Test/Applications/GH-1647/GH-1647.csproj index 022441c0e..e068a1961 100644 --- a/projects/Test/Applications/GH-1647/GH-1647.csproj +++ b/projects/Test/Applications/GH-1647/GH-1647.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 GH_1647 enable enable diff --git a/projects/Test/Applications/MassPublish/MassPublish.csproj b/projects/Test/Applications/MassPublish/MassPublish.csproj index 2ff780b2a..ba23a90df 100644 --- a/projects/Test/Applications/MassPublish/MassPublish.csproj +++ b/projects/Test/Applications/MassPublish/MassPublish.csproj @@ -1,20 +1,20 @@ - net6.0;net472 + net8.0;net472 $(NoWarn);CA2007 true - net6.0 + net8.0 $(NoWarn);CA2007 true Exe - 9.0 + 12.0 diff --git a/projects/Test/Applications/PublisherConfirms/PublisherConfirms.csproj b/projects/Test/Applications/PublisherConfirms/PublisherConfirms.csproj index 9e089be82..0b0de7dd0 100644 --- a/projects/Test/Applications/PublisherConfirms/PublisherConfirms.csproj +++ b/projects/Test/Applications/PublisherConfirms/PublisherConfirms.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 $(NoWarn);CA2007 true @@ -9,7 +9,7 @@ Exe enable - 9.0 + 12.0 diff --git a/projects/Test/Common/Common.csproj b/projects/Test/Common/Common.csproj index 3c283cef8..cc5869cee 100644 --- a/projects/Test/Common/Common.csproj +++ b/projects/Test/Common/Common.csproj @@ -1,13 +1,13 @@  - net6.0;net472 + net8.0;net472 $(NoWarn);CA2007 true - net6.0 + net8.0 $(NoWarn);CA2007 true @@ -16,7 +16,7 @@ ../../rabbit.snk true false - 9.0 + 12.0 diff --git a/projects/Test/Integration/Integration.csproj b/projects/Test/Integration/Integration.csproj index 64ff8776b..585302a85 100644 --- a/projects/Test/Integration/Integration.csproj +++ b/projects/Test/Integration/Integration.csproj @@ -1,13 +1,13 @@ - net6.0;net472 + net8.0;net472 $(NoWarn);CA2007 true - net6.0 + net8.0 $(NoWarn);CA2007 true @@ -16,7 +16,7 @@ ../../rabbit.snk true true - 9.0 + 12.0 diff --git a/projects/Test/OAuth2/OAuth2.csproj b/projects/Test/OAuth2/OAuth2.csproj index 11e1123a7..6710e5d21 100644 --- a/projects/Test/OAuth2/OAuth2.csproj +++ b/projects/Test/OAuth2/OAuth2.csproj @@ -1,13 +1,13 @@  - net6.0;net472 + net8.0;net472 $(NoWarn);CA2007 true - net6.0 + net8.0 $(NoWarn);CA2007 true @@ -16,7 +16,7 @@ ../../rabbit.snk true true - 9.0 + 12.0 enable diff --git a/projects/Test/SequentialIntegration/SequentialIntegration.csproj b/projects/Test/SequentialIntegration/SequentialIntegration.csproj index 9664afe2b..dff8ad5fb 100644 --- a/projects/Test/SequentialIntegration/SequentialIntegration.csproj +++ b/projects/Test/SequentialIntegration/SequentialIntegration.csproj @@ -1,13 +1,13 @@  - net6.0;net472 + net8.0;net472 $(NoWarn);CA2007 true - net6.0 + net8.0 $(NoWarn);CA2007 true @@ -16,7 +16,7 @@ ../../rabbit.snk true true - 9.0 + 12.0 diff --git a/projects/Test/Unit/Unit.csproj b/projects/Test/Unit/Unit.csproj index 0a0286a4b..fc23c107a 100644 --- a/projects/Test/Unit/Unit.csproj +++ b/projects/Test/Unit/Unit.csproj @@ -1,13 +1,13 @@ - net6.0;net472 + net8.0;net472 $(NoWarn);CA2007 true - net6.0 + net8.0 $(NoWarn);CA2007 true @@ -16,7 +16,7 @@ ../../rabbit.snk true true - 9.0 + 12.0