❔ FileNotFoundException for NuGet Pkg in Az Function App

Hi, I'm receiving the following error while trying to locally test an Azure Function App:
System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0, Culture=neutral, PulicKeyToken=adb9793829ddae60'. The system cannot find the file specified.'
System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0, Culture=neutral, PulicKeyToken=adb9793829ddae60'. The system cannot find the file specified.'
This happens during the WebJobsBuilderExtensions ConfigureStartup. I verified that the package is in my .nuget folder and at the path found in project.nuget.cache, and I also tried explicitly installing the package through the package manager. It also happens when I target .NET6 and .NET7, and on both v3 and v4. I found mention of similar errors for version 5.0.0.0 of the Microsoft.Extension packages, but nothing for 7.0.0.0. Not sure where to look and not familiar with debugging NuGet package errors like this.
4 Replies
Henkypenky
Henkypenky2y ago
is this c# script? if so you need to target netstandard2.0
Lexaro
Lexaro2y ago
This error message is indicating that the Microsoft.Extensions.Configuration.Abstractions assembly with version 7.0.0.0 cannot be found. It looks like you have already tried some steps to resolve the issue, such as verifying the package exists in the .nuget folder and explicitly installing it through the package manager.
Wz
Wz2y ago
Guide for running C# Azure Functions in an isolated worker process
Learn how to use a .NET isolated worker process to run your C# functions in Azure, which supports non-LTS versions of .NET and .NET Framework apps.
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.