looks like I have a binding redirects issue that I don't know how to solve.
.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=126.96.36.199, 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=188.8.131.52, 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
This error doesn't happen locally, but happens when I deploy my application.
How can I fix this?
Looks like there were two assemblies being references by the same set of projects, but with different versions. What I did was add both
<PreserveCompilationContext>true</PreserveCompilationContext> to my .csproj file for my StartUp (main) project. This generated a binding reference in my App.config that would point all earlier versions of the assembly to a single version amongst all projects.
User contributions licensed under CC BY-SA 3.0