imperugo / StackExchange.Redis.Extensions

MIT License
605 stars 178 forks source link

Azure Function v3 compatibility issue #454

Open aforank opened 2 years ago

aforank commented 2 years ago

Describe the bug Installing v8.0.3 in a Azure Function v3 application prevents the app to start due to Microsoft.Extensions.Logging.Abstractions 6.0.0 package.

This is the issue I see on the command line

Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

image

I believe this happens because Azure Function v3 Runtime does not support Microsoft.Extensions.xxx packages > 3.1.x

To Reproduce Steps to reproduce the behavior:

  1. Create a function app (v3 .Net Core 3.1) with a single http trigger
  2. Create function and try to get a key from a cache
[FunctionName("Function1")]
        public async Task<IActionResult> Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = "route/Func1")] HttpRequest req)
        {
            var redisConfiguration = new RedisConfiguration() { ConnectionString = "<Connection String>" };
            var poolManager = new RedisConnectionPoolManager(redisConfiguration);
            var cacheClient = new RedisClient(poolManager, serializer: new NewtonsoftSerializer(), redisConfiguration);
            var db = cacheClient.GetDefaultDatabase();
            var kv = await db.GetAsync<string>("RedisTest_Key1");
       }
mario-solytic commented 1 year ago

Any update on this? Having the same issue here, even with the Function v4