Share via

PYTHON, Azure Functions Python (Core Tools v4) fails with Microsoft.Extensions.Options, Version=8.0.0.0 when running locally

Mayra Lara 0 Reputation points
2025-09-29T16:11:48.9933333+00:00

Problem description I am developing an Azure Functions project in Python (no .NET code at all).

When I run my project locally with Azure Functions Core Tools (4.0.5198) and with Azure Functions Core Tools (4.0.5348) , the host fails to start with the following error:

Azure Functions Core Tools

Core Tools Version: 4.0.5198 Commit hash: N/A (64-bit)

Function Runtime Version: 4.21.1.20667

Skipping 'AzureWebJobsStorage' from local settings as it's already defined in current environment variables.

[2025-09-29T15:14:35.258Z] Error configuring services in an external startup class.

[2025-09-29T15:14:35.259Z] Error configuring services in an external startup class. Microsoft.Extensions.Azure: Could not load file or assembly 'Microsoft.Extensions.Options, Version=8.0.0.0, Culture=neutral, PublicKeyToken=a'. El sistema no puede encontrar el archivo especificado.

[2025-09-29T15:14:35.323Z] A host error has occurred during startup operation '5eb06afb-73f4-4468-b896-e462d844281c'.

[2025-09-29T15:14:35.325Z] Microsoft.Azure.WebJobs.Script: Error configuring services in an external startup class. Microsoft.Extensions.Azure: Could not load file or assembly 'Microsoft.Extensions.Options, Version=8.0.0.0, Culture=neutral, PublicKeyToken=a'. El sistema no puede encontrar el archivo especificado.

Value cannot be null. (Parameter 'provider')

[2025-09-29T15:14:35.342Z] Host startup operation has been canceled

What I have tried

  1. At fisrt I had Azure Functions Core Tools (4.0.5348) and only the .NET 8.0 runtime installed → the error occurred.
  2. Then I downgraded to Azure Functions Core Tools (4.0.5198) and installed the .NET 6.0 runtime (so now both 6.0 and 8.0 are installed) → the error still occurs.
  3. I deleted the ExtensionBundles folder so Core Tools could re-download the latest bundle (currently Microsoft.Azure.Functions.ExtensionBundle 4.26.2) → same error.
  4. Confirmed my project structure is correct (host.json, local.settings.json, requirements.txt, function folders with __init__.py and function.json).

My project was working correctly and suddenly this error appears in local while production is running fine.

Is it a documented problem with a solution?

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


1 answer

Sort by: Most helpful
  1. Praveen Kumar Gudipudi 2,290 Reputation points Microsoft External Staff Moderator
    2025-10-10T11:39:21.8+00:00

    Hello Mayra Lara,

    Please ensure you have the following app settings. Most importantly FUNCTIONS_INPROC_NET8_ENABLED

    JSONCopy

      {
        "name": "FUNCTIONS_EXTENSION_VERSION",
        "value": "~4",
        "slotSetting": false
      },
      {
        "name": "FUNCTIONS_INPROC_NET8_ENABLED",
        "value": "1",
        "slotSetting": false
      },
      {
        "name": "FUNCTIONS_WORKER_RUNTIME",
        "value": "dotnet",
        "slotSetting": false
      }
    

    Reference: https://learn.microsoft.com/en-us/azure/azure-functions/functions-dotnet-class-library?tabs=v4%2Ccmd#updating-to-target-net-8

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.