diff --git a/.github/workflows/csharp_build.yml b/.github/workflows/csharp_build.yml
index 04546d2f9..13a4db0c7 100644
--- a/.github/workflows/csharp_build.yml
+++ b/.github/workflows/csharp_build.yml
@@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [ubuntu-20.04, macos-11, windows-2022]
+ os: [ubuntu-20.04, macos-12, windows-2022]
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -18,11 +18,8 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
- 5.0.x
6.0.x
- 7.0.x
8.0.x
- 3.1.x
- name: Build artifacts
working-directory: ./csharp
run: |
diff --git a/csharp/examples/examples.csproj b/csharp/examples/examples.csproj
index 34e146553..905e6a04e 100644
--- a/csharp/examples/examples.csproj
+++ b/csharp/examples/examples.csproj
@@ -3,12 +3,12 @@
-
+
Exe
- net5.0;netcoreapp3.1
+ net6.0;net8.0
true
diff --git a/csharp/rocketmq-client-csharp/Client.cs b/csharp/rocketmq-client-csharp/Client.cs
index f3ea4a87d..1c81b4101 100644
--- a/csharp/rocketmq-client-csharp/Client.cs
+++ b/csharp/rocketmq-client-csharp/Client.cs
@@ -23,7 +23,7 @@
using System.Linq;
using Microsoft.Extensions.Logging;
using Proto = Apache.Rocketmq.V2;
-using grpc = Grpc.Core;
+using grpcLib = Grpc.Core;
namespace Org.Apache.Rocketmq
{
@@ -390,9 +390,9 @@ private async void Heartbeat()
}
}
- internal grpc.Metadata Sign()
+ internal grpcLib.Metadata Sign()
{
- var metadata = new grpc::Metadata();
+ var metadata = new grpcLib::Metadata();
Signature.Sign(this, metadata);
return metadata;
}
diff --git a/csharp/rocketmq-client-csharp/ClientManager.cs b/csharp/rocketmq-client-csharp/ClientManager.cs
index 90fdde7f8..fed6f38c2 100644
--- a/csharp/rocketmq-client-csharp/ClientManager.cs
+++ b/csharp/rocketmq-client-csharp/ClientManager.cs
@@ -19,7 +19,7 @@
using System;
using System.Threading;
using System.Threading.Tasks;
-using grpc = Grpc.Core;
+using grpcLib = Grpc.Core;
using System.Collections.Generic;
using System.Linq;
@@ -89,7 +89,7 @@ public async Task Shutdown()
}
}
- public grpc::AsyncDuplexStreamingCall Telemetry(
+ public grpcLib::AsyncDuplexStreamingCall Telemetry(
Endpoints endpoints)
{
return GetRpcClient(endpoints).Telemetry(_client.Sign());
diff --git a/csharp/rocketmq-client-csharp/Session.cs b/csharp/rocketmq-client-csharp/Session.cs
index ac66d5b7c..d47b60601 100644
--- a/csharp/rocketmq-client-csharp/Session.cs
+++ b/csharp/rocketmq-client-csharp/Session.cs
@@ -20,7 +20,6 @@
using System.Threading.Tasks;
using Grpc.Core;
using Microsoft.Extensions.Logging;
-using grpc = Grpc.Core;
using Proto = Apache.Rocketmq.V2;
namespace Org.Apache.Rocketmq
diff --git a/csharp/rocketmq-client-csharp/Signature.cs b/csharp/rocketmq-client-csharp/Signature.cs
index ea701d161..949ac49c8 100644
--- a/csharp/rocketmq-client-csharp/Signature.cs
+++ b/csharp/rocketmq-client-csharp/Signature.cs
@@ -18,14 +18,14 @@
using System;
using System.Collections.Generic;
using System.Text;
-using grpc = Grpc.Core;
+using grpcLib = Grpc.Core;
using System.Security.Cryptography;
namespace Org.Apache.Rocketmq
{
public static class Signature
{
- public static void Sign(Client client, grpc::Metadata metadata)
+ public static void Sign(Client client, grpcLib::Metadata metadata)
{
var headers = Sign(client);
foreach (var (key, value) in headers)
diff --git a/csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj b/csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj
index b13ea1d1e..5fe87fcdb 100644
--- a/csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj
+++ b/csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj
@@ -6,7 +6,7 @@
RocketMQ Authors
Apache Software Foundation
- net5.0;netcoreapp3.1
+ net6.0;net8.0;
Apache-2.0
Org.Apache.Rocketmq
README.md
@@ -23,13 +23,13 @@
-
-
-
+
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
diff --git a/csharp/tests/tests.csproj b/csharp/tests/tests.csproj
index 1e3b9feef..c16faa0f7 100644
--- a/csharp/tests/tests.csproj
+++ b/csharp/tests/tests.csproj
@@ -1,18 +1,21 @@
- net5.0;netcoreapp3.1
+ net8.0
false
-
-
-
-
-
-
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+