0

trying to add dependency injection into .net core 3.1 azure function. Adding Microsoft.Azure.Functions.Extensions includes Microsoft.Extensions.DependencyInjection version 5.0.1 This throws an error - Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

i dont know how to resolve this. i cannot downgrade DependencyInjection to version 3.xxx as it is part of the extensions package.

user900566
  • 93
  • 1
  • 9
  • Does this answer your question? [Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0 in Azure Functions](https://stackoverflow.com/questions/64809716/could-not-load-file-or-assembly-microsoft-extensions-configuration-abstractions) – Daniel Mann Aug 12 '21 at 17:32
  • Long story short, the 5.* libraries aren't compatible with .NET Core 3.1. Downgrade. – Daniel Mann Aug 12 '21 at 17:32
  • i cannot downgrade, version 5.1 is part of Microsoft.Azure.Functions.Extensions. when in uninstall the extensions package and try to install just dependency injection i still get a warning about detected package downgrade and it wont let me install? – user900566 Aug 16 '21 at 10:05
  • You *can* downgrade, because you *have to*. Pretend the 5.* versions of the packages don't exist. Use the 3.* versions. – Daniel Mann Aug 16 '21 at 23:38
  • Okay, so now we're on .NET 6 and Azure that is supposed to be used with .NET 6 still isn't compatible? – Captain Prinny Jan 24 '22 at 20:39

0 Answers0