Environment
- StackExchange.Redis versoin: 3.1.3
- TargetFramework: net10.0
- Platform: win-x64
Steps to reproduce
- create new project by
dotnet new worker
- add nuget package by
dotnet add package StackExchange.Redis
- edit Worker.cs as https://gist.github.com/itn3000/bc6c9282a33f455cf7621d5ff86560de
- publish by
dotnet publish -p:PublishAot=true -r win-x64
- run published app
Expected
output connection error and keep worker running
Actual
output following error and stop entire app
Unhandled exception. System.MissingFieldException: Field not found: '_invocationList'.
at StackExchange.Redis.Delegates.s_getArr(MulticastDelegate) + 0x15
at StackExchange.Redis.ConnectionMultiplexer.TryCompleteHandler[T](EventHandler`1, Object, T, Boolean) + 0x4b
at StackExchange.Redis.ConnectionFailedEventArgs.StackExchange.Redis.ICompletable.TryComplete(Boolean) + 0x22
at StackExchange.Redis.ConnectionMultiplexer.<>c.<.cctor>b__85_0(Object) + 0x22
at System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x16a
at System.Threading.WindowsThreadPool.DispatchCallback(IntPtr, IntPtr, IntPtr) + 0x60
Additional Info
if NativeAOT is disabled, app works as expected.
This is reproduced in 3.0.25, but not reproduced in 2.13.17
Environment
Steps to reproduce
dotnet new workerdotnet add package StackExchange.Redisdotnet publish -p:PublishAot=true -r win-x64Expected
output connection error and keep worker running
Actual
output following error and stop entire app
Additional Info
if NativeAOT is disabled, app works as expected.
This is reproduced in 3.0.25, but not reproduced in 2.13.17