Problem with Running an Azure Function Locally: What Finally Worked for Me

This week, I needed to update an Azure Function built with C# and .NET 8 using the in-process execution model (support ends in November 2026 for this execution model, so we know a migration is coming). I hadn’t touched this function in a while.

When I tried running it after downloading the repo, I hit this error:

Missing value for AzureWebJobsStorage in local.settings.json. This is required for all triggers other than httptrigger, kafkatrigger, rabbitmqtrigger, orchestrationTrigger, activityTrigger, entityTrigger. You can run ‘func azure functionapp fetch-app-settings <functionAppName>’, specify a connection string in local.settings.json, or use managed identity to authenticate.

My local.settings.json was correct and set to “Copy Always.” I deleted the obj folder, cleaned, rebuilt, but the error stayed the same. It seemed like the function just couldn’t read the settings file.

To make sure it wasn’t just me, I asked my teammate to try running it on her end. She told me, “It ran for me in the past, but now it’s not actually working.” So at this point, neither of us could get it running.

I tried GitHub Copilot, which suggested moving the settings to launchSettings.json under environmentVariables. That made the first error disappear—but then a new set of errors showed up:

Error configuring services in an external startup class. [2025-06-13T16:04:12.983Z] Error configuring services in an external startup class. Epilink.Functions:Could not load file or assembly ‘Microsoft.Extensions.Http, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’. The system cannot find the file specified. [2025-06-13T16:04:13.221Z] A host error has occurred during startup operation ‘f0007093-6052-4ac4-add5-ea6faaa55434’. [2025-06-13T16:04:13.224Z] Microsoft.Azure.WebJobs.Script: Error configuring services in an external startup class. Epilink.Functions: Could not load file or assembly ‘Microsoft.Extensions.Http, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’. The system cannot find the file specified

At this point, all sorts of dependency and assembly loading issues were happening, even though the project had worked before.

Comparing Environments Revealed the Clue

Next, I tried running the same function on my desktop. The first error (about storage) appeared there too, but after moving the settings to launchSettings.json, it started up. This made me compare both computers closely.

That’s when I spotted it: the Azure Functions Core Tools version was different between the two machines. This was the first real clue.

Updating Azure Functions Core Tools

GitHub Copilot suggested updating the tools using npm, but I didn’t remember installing the Azure Functions tools that way, so I checked Visual Studio instead.

  1. Opened Visual Studio → Tools → Options → Projects and Solutions → Azure Functions.
  2. Clicked Check for updates.
  3. After I clicked “Check for updates,” a “Download and Install” button appeared. I clicked that to update the toolset.

Interestingly, the installed release version number didn’t change. But a message appeared at the bottom left corner of Visual Studio saying the toolset was updated.

Clean, Rebuild, and Finally Success

After updating, I cleaned and rebuilt the project. This time, the Azure Function ran without errors. The Core Tools version reported as 4.0.718 (previously it was 4.0.6518). I also updated Microsoft.NET.Sdk.Functions following Microsoft’s official documentation.

Final Thoughts

Troubleshooting these issues can be frustrating, but you’re not alone. In our case, neither my teammate nor I could get the function running—until we updated the development toolset. Sometimes, a hidden version mismatch or toolset refresh is what finally solves it.

I hope this saves someone else some time.


Jelard Avatar