Lirrik avatar image
Lirrik asked joao.reis commented

C# driver NuGet package prevents upgrade for System.Threading.Tasks.Dataflow

Hi there,

Is there any specific reason C# driver NuGet package ( has a restriction on the maximum version of its dependency System.Threading.Tasks.Dataflow? In this case the bounds are set to be (>= 4.6.0 && < 5.0.0), version 5.0.0 was released recently, and C# driver prevents us from upgrading.

csharp driver
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

joao.reis avatar image
joao.reis answered joao.reis commented

Hi, unfortunately the driver doesn't officially support that version of System.Threading.Tasks.Dataflow yet. I've created to track this.

Locally I tried installing it on a .NET Core 3.1 project with v 3.16.1 of the driver and although I got a warning, it still got installed and builds successfully so you might want to try it out. Note that we haven't tested this version of Dataflow with the driver yet so this is a bit risky.

PS C:\Users\Joao\source\repos\ConsoleApp2\ConsoleApp2> dotnet add package System.Threading.Tasks.Dataflow
  Determining projects to restore...
  Writing C:\Users\Joao\AppData\Local\Temp\tmpAEB1.tmp
info : Adding PackageReference for package 'System.Threading.Tasks.Dataflow' into project 'C:\Users\Joao\source\repos\ConsoleApp2\ConsoleApp2\ConsoleApp2.csproj'.
info : Restoring packages for C:\Users\Joao\source\repos\ConsoleApp2\ConsoleApp2\ConsoleApp2.csproj...
info :   CACHE
warn : Detected package version outside of dependency constraint: CassandraCSharpDriver 3.16.1 requires System.Threading.Tasks.Dataflow (>= 4.6.0 && < 5.0.0) but version System.Threading.Tasks.Dataflow 5.0.0 was resolved.
info : Package 'System.Threading.Tasks.Dataflow' is compatible with all the specified frameworks in project 'C:\Users\Joao\source\repos\ConsoleApp2\ConsoleApp2\ConsoleApp2.csproj'.
info : PackageReference for package 'System.Threading.Tasks.Dataflow' version '5.0.0' updated in file 'C:\Users\Joao\source\repos\ConsoleApp2\ConsoleApp2\ConsoleApp2.csproj'.
info : Committing restore...
info : Writing assets file to disk. Path: C:\Users\Joao\source\repos\ConsoleApp2\ConsoleApp2\obj\project.assets.json
log  : Restored C:\Users\Joao\source\repos\ConsoleApp2\ConsoleApp2\ConsoleApp2.csproj (in 385 ms).
2 comments Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Hi Joao, thank you for your quick response!

From what I see in the C# driver NuGet package history, this upper bound version restriction for System.Threading.Tasks.Dataflow has always been there since this dependency was introduced, but that was long before Dataflow v5.0.0 was released, so it can't be because of incompatibility reasons. I found this interesting considering none of the other dependencies have an upper bound set like that, hence I was asking if there was any specific reason for that.

Hope there are really no issues with it and it can be updated soon!

0 Likes 0 ·

Yes, you're right. We added that restriction just to make sure users would not accidentally break their app by upgrading the major version of this dependency because usually major versions introduce binary compatibility issues.

When CSHARP-946 is addressed we might just drop that restriction altogether. We don't enforce that with any other dependency anyway if I recall correctly.

0 Likes 0 ·
Erick Ramirez avatar image
Erick Ramirez answered

I don't believe it's supported yet.

I'm going to reach out to the Drivers devs here at DataStax and get you some more details. Cheers!

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.