diff --git a/.ci/versions.json b/.ci/versions.json
index 3e27e8dbe1..4715cc1083 100644
--- a/.ci/versions.json
+++ b/.ci/versions.json
@@ -1,4 +1,4 @@
{
"erlang": "25.3",
- "rabbitmq": "3.11.10"
+ "rabbitmq": "3.11.11"
}
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index d6a02b0dc1..bcbd2bb6e4 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -44,7 +44,7 @@ jobs:
- name: Restore
run: dotnet restore --verbosity=normal
- name: ApiGen
- run: dotnet run --framework "netcoreapp3.1" --project ./projects/Apigen/Apigen.csproj --apiName:AMQP_0_9_1 ./projects/specs/amqp0-9-1.stripped.xml ./gensrc/autogenerated-api-0-9-1.cs
+ run: dotnet run --framework net6.0 --project ./projects/Apigen/Apigen.csproj --apiName:AMQP_0_9_1 ./projects/specs/amqp0-9-1.stripped.xml ./gensrc/autogenerated-api-0-9-1.cs
- name: Build
run: dotnet build --no-restore --verbosity=normal
- name: Test
@@ -85,10 +85,10 @@ jobs:
- name: Restore
run: dotnet restore --verbosity=normal
- name: ApiGen
- run: dotnet run --framework "netcoreapp3.1" --project ./projects/Apigen/Apigen.csproj --apiName:AMQP_0_9_1 ./projects/specs/amqp0-9-1.stripped.xml ./gensrc/autogenerated-api-0-9-1.cs
+ run: dotnet run --framework net6.0 --project ./projects/Apigen/Apigen.csproj --apiName:AMQP_0_9_1 ./projects/specs/amqp0-9-1.stripped.xml ./gensrc/autogenerated-api-0-9-1.cs
- name: Build
run: dotnet build --no-restore --verbosity=normal
- name: Test
- run: dotnet test --no-restore --no-build --logger "console;verbosity=detailed" --framework "netcoreapp3.1"
+ run: dotnet test --no-restore --no-build --logger "console;verbosity=detailed" --framework net6.0
env:
RABBITMQ_RABBITMQCTL_PATH: DOCKER:${{job.services.rabbitmq.id}}
diff --git a/RUNNING_TESTS.md b/RUNNING_TESTS.md
index fc847091c9..fb634a8373 100644
--- a/RUNNING_TESTS.md
+++ b/RUNNING_TESTS.md
@@ -104,9 +104,9 @@ Running individual tests and fixtures on Windows is trivial using the Visual Stu
To run a specific tests fixture on MacOS or Linux, use the NUnit filter expressions to select the tests to be run:
``` shell
-dotnet test projects/Unit -f netcoreapp3.1 --filter "Name~TestAmqpUriParseFail"
+dotnet test projects/Unit -f net6.0 --filter "Name~TestAmqpUriParseFail"
-dotnet test projects/Unit -f netcoreapp3.1 --filter "FullyQualifiedName~RabbitMQ.Client.Unit.TestHeartbeats"
+dotnet test projects/Unit -f net6.0 --filter "FullyQualifiedName~RabbitMQ.Client.Unit.TestHeartbeats"
```
## Running Tests for a Specific .NET Target
@@ -114,5 +114,5 @@ dotnet test projects/Unit -f netcoreapp3.1 --filter "FullyQualifiedName~RabbitMQ
To only run tests on .NET Core:
``` shell
-dotnet test -f netcoreapp3.1 projects/Unit
+dotnet test -f net6.0 projects/Unit
```
diff --git a/projects/Apigen/Apigen.csproj b/projects/Apigen/Apigen.csproj
index 03a95c087c..b28a525f27 100755
--- a/projects/Apigen/Apigen.csproj
+++ b/projects/Apigen/Apigen.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0;netcoreapp3.1
+ net6.0
diff --git a/projects/RabbitMQ.Client/RabbitMQ.Client.csproj b/projects/RabbitMQ.Client/RabbitMQ.Client.csproj
index 4f226ba364..8bc5106132 100755
--- a/projects/RabbitMQ.Client/RabbitMQ.Client.csproj
+++ b/projects/RabbitMQ.Client/RabbitMQ.Client.csproj
@@ -2,6 +2,7 @@
net461;netstandard2.0
+ true
$(NoWarn);CS1591
true
RabbitMQ Client Library for .NET
@@ -53,15 +54,15 @@
-
-
+
+
-
-
+
+
-
+
diff --git a/projects/RabbitMQ.Client/client/impl/TcpClientAdapter.cs b/projects/RabbitMQ.Client/client/impl/TcpClientAdapter.cs
index 2cb0eb58cc..98e8de484f 100644
--- a/projects/RabbitMQ.Client/client/impl/TcpClientAdapter.cs
+++ b/projects/RabbitMQ.Client/client/impl/TcpClientAdapter.cs
@@ -27,7 +27,7 @@ public virtual async Task ConnectAsync(string host, int port)
throw new ArgumentException($"No ip address could be resolved for {host}");
}
-#if NET461
+#if NET461 || NET462
await Task.Run(() => _sock.Connect(ep, port)).ConfigureAwait(false);
#else
await _sock.ConnectAsync(ep, port).ConfigureAwait(false);
@@ -78,7 +78,7 @@ public virtual bool Connected
{
get
{
- if(_sock == null) return false;
+ if (_sock == null) return false;
return _sock.Connected;
}
}
@@ -99,7 +99,7 @@ public virtual TimeSpan ReceiveTimeout
private void AssertSocket()
{
- if(_sock == null)
+ if (_sock == null)
{
throw new InvalidOperationException("Cannot perform operation as socket is null");
}
diff --git a/projects/Unit/TestConnectionRecovery.cs b/projects/Unit/TestConnectionRecovery.cs
index 38bf728935..e6cf213b45 100644
--- a/projects/Unit/TestConnectionRecovery.cs
+++ b/projects/Unit/TestConnectionRecovery.cs
@@ -31,7 +31,6 @@
using System;
using System.Collections.Generic;
-using System.ServiceModel.Channels;
using System.Text;
using System.Threading;
@@ -827,7 +826,7 @@ public void TestUnbindQueueAfterRecoveryConnection()
Assert.IsTrue(nameBefore.StartsWith("amq."));
Assert.IsTrue(nameAfter.StartsWith("amq."));
Assert.AreNotEqual(nameBefore, nameAfter);
- Model.QueueUnbind(nameAfter,x,"");
+ Model.QueueUnbind(nameAfter, x, "");
Model.QueueDeleteNoWait(nameAfter);
latch.Reset();
CloseAndWaitForRecovery();
diff --git a/projects/Unit/Unit.csproj b/projects/Unit/Unit.csproj
index 92b6faa8e3..2f848e29e2 100755
--- a/projects/Unit/Unit.csproj
+++ b/projects/Unit/Unit.csproj
@@ -1,7 +1,7 @@
- net461;netcoreapp3.1
+ net462;net6.0
../rabbit.snk
true
@@ -11,12 +11,11 @@
-
-
-
-
-
-
+
+
+
+
+
diff --git a/run-test.sh b/run-test.sh
index c2a2146015..56db81db23 100755
--- a/run-test.sh
+++ b/run-test.sh
@@ -13,4 +13,4 @@ fi
cd "$script_dir"
-dotnet test --no-build --logger 'console;verbosity=detailed' --framework 'netcoreapp3.1' ./RabbitMQDotNetClient.sln < /dev/null
+dotnet test --no-build --logger 'console;verbosity=detailed' --framework 'net6.0' ./RabbitMQDotNetClient.sln < /dev/null