Datastax C#驱动程序.Build引发System.IO.FileLoadException

问题描述

看起来我有一个绑定重定向问题,我不知道如何解决。

调用.Build()时,出现以下异常:

[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,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

此解决方案中的另一个项目引用了System.Threading.Tasks.Dataflow,Version=4.11.1.0

此错误不是在本地发生,而是在我部署应用程序时发生。

我该如何解决?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)