I am getting the following exception when trying to use the latest Nuget package StackExchange.Redis
in Cloud Service for .Net 4.7
System.InvalidOperationException: The assembly for System.Buffers and System.IO.Pipelines could not be loaded; this usually means a missing assembly binding redirect - try checking this, and adding any that are missing; note that it is not always possible to add this redirects - for example 'azure functions v1'; it looks like you may need to use 'azure functions v2' for that - sorry, but that's out of our control at Pipelines.Sockets.Unofficial.Helpers.g__Throw|5_0(String msg) at Pipelines.Sockets.Unofficial.Helpers.AssertDependencies() at StackExchange.Redis.ConnectionMultiplexer.Connect(String configuration, TextWriter log) at ...
This is coming from a Worker Role in Cloud Service, which is referencing to a class library referencing to this package. Also, I am not able to reproduce this locally. It happens only after deployment to the VM/Cloud Service.
What am I missing?
Add assembly redirect:
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" />
<bindingRedirect oldVersion="4.0.2.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
Found the details here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With