Skip to content

System.Buffers, Version=4.0.2.0 error with "Azure Functions" (DOT NET) #961

@gagant-zz

Description

@gagant-zz

I am writing to report an error I a facing while trying to connect to Redis Server from Azure function developed in VS2017 (DOT NET). I am using StackExchange.Redis 2.0.505. with Azure Redis basic plan for development. Redis server on Azure portal working fine. I am getting this error on flowing call.
cacheDb.SetAdd(loginUser.Id.ToString(),JsonConvert.SerializeObject(loginUser));

It seems to me reference issue with "System.Buffers" however, unit-tests are working fine, it's just "Azure Functions" throwing an exception.
StackExchange.Redis>>Pilelines.Sockets.unofficial has a reference of System.Buffer. of 4.5 whereas process required 4.0.2.0

Here are a detail error and stack trace:

Error Message: No connection is available to service this operation: SADD 1b4490c0-55f4-400c-b4f6-869ddb2664eb; Could not load file or assembly 'System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.; IOCP: (Busy=0,Free=1000,Min=8,Max=1000), WORKER: (Busy=2,Free=1021,Min=8,Max=1023), Local-CPU: n/a

Stack: No connection is available to service this operation: SADD 1b4490c0-55f4-400c-b4f6-869ddb2664eb; Could not load file or assembly 'System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.; IOCP: (Busy=0,Free=1000,Min=8,Max=1000), WORKER: (Busy=2,Free=1021,Min=8,Max=1023), Local-CPU: n/a

Inner Exception level 1
Message: SocketFailure on timetrialdev.redis.cache.windows.net:6379/Subscription, Initializing, last: NONE, origin: ConnectedAsync, outstanding: 0, last-read: 0s ago, last-write: 0s ago, unanswered-write: 892907s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 0s ago, v: 2.0.505.18761

Stack:

Inner Exception level 2
Message: Could not load file or assembly 'System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

Stack:
at System.IO.Pipelines.PipeCompletion.AddCallback(Action2 callback, Object state) at System.IO.Pipelines.Pipe.OnReaderCompleted(Action2 callback, Object state)
at System.IO.Pipelines.Pipe.DefaultPipeWriter.OnReaderCompleted(Action`2 callback, Object state)
at Pipelines.Sockets.Unofficial.SocketConnection..ctor(Socket socket, PipeOptions sendPipeOptions, PipeOptions receivePipeOptions, SocketConnectionOptions socketConnectionOptions, String name)
at StackExchange.Redis.PhysicalConnection.d__98.MoveNext()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions