I have an API and a separate Azure Functions app. I upgraded my API app to .NET 5
and it's working fine. In the API app's solution, I have class library projects that I also reference in my Azure Functions app. These class libraries are netstandard2.1
projects.
Ever since this update -- during which I also updated all my NuGet packages to latest versions -- my Azure Functions app stopped working. I'm getting the following 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. Value cannot be null. (Parameter 'provider')
I noticed that there were breaking changes involving the Microsoft.Extensions.*
packages and their recommendation is to install the package that is causing the issue directly. So I added Microsoft.Extensions.Configuration.Abstractions
to my Azure Functions manually -- before it was being installed as a dependency of Microsoft.Extensions.Configuration
package. Here's the information about this:
https://github.com/dotnet/aspnetcore/issues/21033
The issue still persists. I even tried downgrading Microsoft.Extensions.Configuration
in both the API and Functions app, but I'm still getting the same error.
Any idea how to resolve this issue?