Could not load file or assembly Microsoft.Extensions.Logging.Abstractions

I fixed it by changing the Function runtime version. It was set to ~2 . I changed it to ~3 and that made the error go away.

You can do it in Function App -> Configuration -> Function runtime


I had the issue too, The changed the version to 2.1.1 and it works for me.


I have just come across a similar issue. For me the problem was I had included one of the Microsoft.Extensions.xxx packages with Version="5.0.0" but my target framework was netcoreapp3.1.

Changing the version of the referenced extension package to the same as my target framework resolved the error.

E.g.

Change:

<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />

To:

<PackageReference Include="Microsoft.Extensions.Http" Version="3.1.10" />

The real problem was I ran dotnet add package Microsoft.Extensions.xxx without specifying the version so it just added the latest available.