Reputation: 4433
I am building a .Net application that uses gRPC to communicate with another service.
The issue that I am having is that the client is a .Net Standard 2.0 application. This cannot be upgraded.
In another project I successfully have a .Net Core 3.1 client communicating with the service using Grpc.Net.Client for authentication. https://www.nuget.org/packages/Grpc.Net.Client
The problem I am having is that there is no version of this lib for .Net Standard 2.0 and I am struggling to implement channel authentication.
Is there a similar library or sample code to implement channel authentication in a .Net Standard 2.0 client?
Any help would be appreciated.
Upvotes: 1
Views: 1901
Reputation: 207
It looks like netstandard2.0 was recently added. https://github.com/grpc/grpc-dotnet/pull/1203. Not sure on the release schedule, but it looks like the dev work is already completed.
Your other option would be to use the gRPC core library which supports targets for netstandard2.0 and net4.5 https://github.com/grpc/grpc/tree/master/src/csharp
Upvotes: 1
Reputation: 1663
https://github.com/grpc/grpc-dotnet based client requires netstandard2.1 (.NET Core 3+) and that will always be the case because earlier versions of .NET don't support the necessary HTTP/2 bindings.
For netstandard2.0 and net45 you can still use the original gRPC C# dotnet implementation: https://github.com/grpc/grpc/blob/master/src/csharp/README.md
Upvotes: 1