Could not load System.Memory.Data when running `func start`

Mike Klinkhammer 20 Reputation points
2025-03-18T18:36:48.21+00:00

I am suddenly having this issue when I try and run my azure functions locally. I am using azure core tools and azurite to run these functions locally using the debugger 'attach to python functions'. We have all of our connections info in my local.settings.json file but I didn't change any of these connections. I have tried uninstalling the core tools package and azurite but that did not work. When I go to where the my core tools package is located in my file explorer I can find the file it is complaining about. I can find similar threads but nothing that seems to work for me so any help would be appreciated. The only thing I can think of is some kind of package mismatch but I was able to run this successfully with the same versions and settings before the weekend.

Also worth mentioning that I am working on a virtual machine that runs windows because I using a Mac. This hasn't been an issue but worth mentioning.

Specific error here:

[2025-03-18T16:48:03.899Z] A host error has occurred during startup operation '28def80f-0277-43ff-b005-b43eddbf4f19'.

[2025-03-18T16:48:03.902Z] System.Private.CoreLib: Exception has been thrown by the target of an invocation. Microsoft.Azure.WebJobs.Extensions.Storage.Queues: Could not load file or assembly 'System.Memory.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=abc123'. The system cannot find the file specified.
Value cannot be null. (Parameter 'provider')

[2025-03-18T16:48:03.962Z] Host startup operation has been canceled

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,674 questions
{count} votes

Accepted answer
  1. LeelaRajeshSayana-MSFT 17,521 Reputation points
    2025-03-18T19:45:58.76+00:00

    @Mike Klinkhammer Can you try updating the package System.Memory.Data to the latest stable version 9.0.3 and test this behavior? It could be possible that the latest version of Azure Core tools is not compatible with this version. Can you also check by creating a new project and see if you encounter this issue? If you see this behavior only in the exisitng project, it most definitely is due to the project referencing the wrong dependency. Try rebuilding the project and see if the function app points to the correct dependencies.

    Please keep us posted on your findings.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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