Could not load file or assembly "Microsoft.Diagnostics.Tracing.EventSource" exception

0

I have an application that uses RabbitMQ.Client library. This library has a dependency on Microsoft.Diagnostics.Tracing.EventSource (v1.1.28) library. Now, I have Microsoft.Diagnostics.Tracing.EventSource library with v2.0.1 in my project. So I get an error whenever RabbitMq.Client tries to load this dependent assembly:

Could not load file or assembly 'Microsoft.Diagnostics.Tracing.EventSource, Version=1.1.28.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)

I have tried using bindingRedirect to resolve this but it is not working. I also can't directly NuGet this library because we use "paket" to download all the dependencies needed for the application and it already contains:

nuget Microsoft.Diagnostics.Tracing.EventSource 1.1.28.0

Following is the content in my "paket.lock" file:

    RabbitMQ.Client (5.1)
      Microsoft.Diagnostics.Tracing.EventSource.Redist (>= 1.1.28)
    Microsoft.Diagnostics.Tracing.EventSource (1.1.28)
      Microsoft.Diagnostics.Tracing.EventRegister (>= 1.1.28)
      Microsoft.Diagnostics.Tracing.EventSource.Redist (>= 1.1.28)
    Microsoft.Diagnostics.Tracing.EventSource.Redist (2.0.1)

Could anyone please suggest any idea on how to resolve this issue. Thanks in advance.

c#
.net
dll
rabbitmq
paket
asked on Stack Overflow Jul 30, 2020 by Gaurav Ahuja

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0