Heyya,
We recently went through with upgrading all our projects from .NET Core 3.0 to 3.1, as well as most of the associated NuGet packages. The projects themselves are hosted as services and function-apps on portal.azure.com, and is transferred via a Bitbucket repository (pushed up from development, pulled down automagically by Azure).
This worked great for two out of three services, but the last one have proved to be difficult. The service itself is working fine, and it's (seemingly) doing what it should when testing it via localhost, but the associated Function-app is throwing "System.Private.CoreLib: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0>'. The system cannot find the file specified." at us.
After some investigating, it would seem there was no Microsoft.Extensions.Logging.Abstractions package installed at all according to our NuGet Manager, but it was still being used by ILogger
in the code (explanations for this one are very welcome). Nevertheless, we forced a downgrade to Microsoft.Extensions.Logging.Abstractions version 3.1.10, tested the application via localhost before deploying it, and this time we got the exact same error message, thrown in Program.cs
. Guessing this wouldn't make things better even if we tried pushing it up.
The target version of the function-app is ~3
(only ~3
and ~1
is available, not ~2
), and it has worked prior to this. The AzureFunctionVersion (available in the project's configuration files) is v3
. Re-creating the function-app on the Portal does not seem to have made any difference.