-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Buffers, Version=4.0.2.0 error with "Azure Functions" (DOT NET) #961
Comments
Sounds like an assembly bindings redirect issue. What runtime are you targeting / running in here? Is it net46* by any chance? |
I hit this issue today - no azure component - just local instance of Redis. We recently upgraded from 4.5.2 to 4.7.2 We are using package reference with nuget and vs2017 |
@adamstewart1980 the "azure functions" one is a bit of a special case and will have different answers. Can you clarify what runtime / platform you are targeting? This is almost certainly an assembly binding redirect problem, so the question becomes: what didn't get added, and is it just a minor config change? |
I'm in the process of pushing out some updates that play with the targets and add explicit dependency checks. If we're having a good day, the new targets (for "unofficial") will make it work; if we're having a less good day, we should at least get a better error message. |
Please try with 2.0.510 - now available on nuget. I can't guarantee it is going to work (azure functions v1 has some... features there), but: it might. |
K; we've determined that this still wasn't happy (see above) - we've now released 2.0.513 which should (crosses fingers) now play a lot happier. |
We think this is resolved in 513 |
Sorry to report but it doesn't appear to be resolved... We have a .NET Standard 2.0 caching library used by both classic ASP.NET MVC 4.7.2 apps and .NET Core 2.1 apps, we have been running on 1.2.6 with no problems in the 4.7.2 sphere however .NET Core apps were playing up. So we upgraded the caching library to the latest .513 and that cleared up the .NET Core issues, great! ...however the 4.7.2 apps then threw a bunch of errors.
We played with binding redirects on the 4.7.2 web applications but to no avail, the best we got was a fresh error message so we gave up at that point and rolled back to 1.2.6.
Looks like I'm not the only one with such problems recently; |
I am on 2.0.519 and still seeing this issue running locally |
@f2calv I had the same issue and I solved it by I don't know if it's clear, so, I have:
After everything was updated to latest from Nuget, I went realized ServiceA dependencies had little warnings icons, even when Visual Studio said everything was ok, so after a Hope it helps. |
Still occurring in 2.0.601 For reference, I am referencing the cache through a .Net Standard 2.0 library from a .Net Core 2.2 Web API project (which works successfully) and a .Net 4.7.2 Azure Worker Role (which gives the error mentioned in previous comments) |
I've found my answer here. Add assembly redirect
|
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(Action
2 callback, Object state) at System.IO.Pipelines.Pipe.OnReaderCompleted(Action
2 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()
The text was updated successfully, but these errors were encountered: