looks like I have a binding redirects issue that I don't know how to solve.
When .Build()
is called, I get the following exception:
[2020-10-09 14:09:28.806] [ :001] [ERROR] [DatabaseClient ] Failed to connect to Cassandra Database...
System.IO.FileLoadException: Could not load file or assembly 'System.Threading.Tasks.Dataflow, Version=4.6.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.Threading.Tasks.Dataflow, Version=4.6.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Cassandra.ProtocolEvents.ProtocolEventDebouncer..ctor(ITimerFactory timerFactory, TimeSpan delay, TimeSpan maxDelay)
at Cassandra.Cluster..ctor(IEnumerable`1 contactPoints, Configuration configuration)
at Cassandra.Cluster.BuildFrom(IInitializer initializer, IReadOnlyList`1 nonIpEndPointContactPoints, Configuration config)
at OpportunityRecorder.DatabaseClient.<ConnectToCassandraAsync>d__12.MoveNext() in C:\Gitlab-Runner\builds\4Gddire9\0\dev\V\OpportunityRecorder\OpportunityRecorder\DatabaseClient.cs:line 46
I have another project in this solution that references System.Threading.Tasks.Dataflow, Version=4.11.1.0
.
This error doesn't happen locally, but happens when I deploy my application.
How can I fix this?
Can you try installing
System.Threading.Tasks.Dataflow, Version=4.11.1.0
in the project that uses the DataStax driver?