Regression since 2.76.0: ConnectivityState and GrpcChannel.State no longer available from Grpc.Net.Client
- Dominant language
- C#
- Stars
- 4.5k
- Forks
- 836
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 7
Description
Hi team,
Starting with Grpc.Net.Client 2.76.0 (NuGet: **Grpc.Net.Client**), it looks like the public **enum ConnectivityState** and the property **GrpcChannel.State** are no longer exposed/available to consumers.
From reading the code, this seems related to load balancing support being conditionally excluded for .NET 6 (or certain TFMs). This is a bit surprising, because load balancing used to work / be supported before.
My current hypothesis is that this happened as a side effect of shifting the minimum supported runtime to .NET 8, and some code paths became gated behind conditional compilation symbols that effectively hide these APIs for older TFMs. However, it’s confusing because the package still targets **.NET Standard 2.0**, which covers .NET 6, and .NET 6 likely still has the underlying support for load balancing — but the API ends up unavailable due to incorrect (or overly strict) conditional compilation.
More broadly, removing public API surface in a future version is not a great experience for consumers. Usually this is handled by:
keeping the API but gating behavior at runtime, or
- using conditional compilation to keep it but emit an **[Obsolete]** warning / analyzer guidance first, rather than removing it outright.
- Even with that approach, hiding it specifically for .NET 6+ looks unnecessary and potentially incorrect.
Could you please confirm:
1. Is this removal intentional starting from 2.76.0?
2. If intentional, what is the recommended replacement for GrpcChannel.State / ConnectivityState?
3. If not intentional, could this be fixed by adjusting the conditional compilation / TFM guards so that .NET 6 consumers still get the API surface?
Thanks!
Contributor guide
Research direction
Start by comparing the Grpc.Net.Client 2.76.0 public API with the previous version, focusing on ConnectivityState and GrpcChannel.State and the conditional compilation or TFM guards mentioned in the report. Check the package's .NET 6 and .NET Standard 2.0 targets; done means confirming whether the regression is intentional and restoring the APIs or identifying the supported replacement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100