This way .net 6 and .net 8 versions of Open.ChannelExtensions won't have any dependencies.
As per Microsoft:
The System.Threading.Channels namespace provides a set of synchronization data structures for passing data between producers and consumers asynchronously. The library targets .NET Standard and works on all .NET implementations. This library is available in the System.Threading.Channels NuGet package. However, if you're using .NET Core 3.0 or later, the package is included as part of the framework.
And Steven Toub recommends using System.Threading.Channels that ships with framework, over the NuGet when possible, since the native version is optimized and performs better (paraphrasing). Direct quote below:
System.Threading.Channels is part of the .NET Core shared framework, meaning a .NET Core app can start using it without installing anything additional. It’s also available as a separate NuGet package, though the separate implementation doesn’t have all of the optimizations that built-in implementation has, in large part because the built-in implementation is able to take advantage of additional runtime and library support in .NET Core.
Source: https://devblogs.microsoft.com/dotnet/an-introduction-to-system-threading-channels/
Since System.Threading.Channels is part of the framework since .Net Core 3, the NuGet reference can be made conditional to netstandard 2.0 and 2.1
This way .net 6 and .net 8 versions of Open.ChannelExtensions won't have any dependencies.
As per Microsoft:
The System.Threading.Channels namespace provides a set of synchronization data structures for passing data between producers and consumers asynchronously. The library targets .NET Standard and works on all .NET implementations. This library is available in the System.Threading.Channels NuGet package. However, if you're using .NET Core 3.0 or later, the package is included as part of the framework.
And Steven Toub recommends using System.Threading.Channels that ships with framework, over the NuGet when possible, since the native version is optimized and performs better (paraphrasing). Direct quote below:
System.Threading.Channels is part of the .NET Core shared framework, meaning a .NET Core app can start using it without installing anything additional. It’s also available as a separate NuGet package, though the separate implementation doesn’t have all of the optimizations that built-in implementation has, in large part because the built-in implementation is able to take advantage of additional runtime and library support in .NET Core.
Source: https://devblogs.microsoft.com/dotnet/an-introduction-to-system-threading-channels/