Showing results for 
Show  only  | Search instead for 
Did you mean: 

AppDynamics - application using StackExchange.Redis crashes



After installing AppDynamics .NET Agent on the same nodes as our wcf services we started to receive lots of exceptions on application start.

How to reproduce
Exceptions are occurring on AppPool startup (basically each time when we do deployment).

Additional info

Here is a snippet of the StackTrace

  Type:    System.InvalidProgramException
  Message: Common Language Runtime detected an invalid program.
  Source:  StackExchange.Redis
  Stack Trace: 
   at StackExchange.Redis.ConnectionMultiplexer.ExecuteAsyncImpl[T](Message message, ResultProcessor`1 processor, Object state, ServerEndPoint server)
   at StackExchange.Redis.RedisBase.ExecuteAsync[T](Message message, ResultProcessor`1 processor, ServerEndPoint server)
   at StackExchange.Redis.RedisDatabase.KeyDeleteAsync(RedisKey[] keys, CommandFlags flags)


Initially we thought the problem lies within this StackExchange.Redis NuGet as we were using old version which was using some IL code etc.
We've updated our version to their latest in which they don't use any IL code, but issue continues to persist.
I've come across to the  following document -

It seems the InvalidProgramException was happening for NewtonSoft.Json NuGet and I'm wondering whether we are not falling under similar case for StackExchange.Redis NuGet?


Does someone faced similar error? 

Can you advice on how to resolve this?


.NET Agent version we are using is

.NET Framework is v4.7.2


Thanks for assistance in advance.