azure-functions-host: Azure Functions - Could not load file or assembly 'System.Memory.Data, Version=6.0.0.0
Issue Transfer
This issue has been transferred from the Azure SDK for .NET repository, #46577.
Please be aware that @fhtino is the author of the original issue and include them for any questions or replies.
Details
Library name and version
Azure.Data.Tables 12.9.1 and Azure.Storage.Blobs 12.22.2
Describe the bug
Cannot use Azure.Data.Tables and Azure.Storage.Blobs in the same Azure Functions project in VS 2022. When I use the TableClient I get
System.IO.FileNotFoundException: Could not load file or assembly 'System.Memory.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
File name: 'System.Memory.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at Azure.Core.RequestContent.Create(Object serializable, ObjectSerializer serializer)
at Azure.Core.RequestContent.Create(Object serializable)
at Azure.Data.Tables.TableClient.CreateIfNotExistsAsync(CancellationToken cancellationToken)
at azfunct1.HelloWorld.Run(HttpRequest req, ILogger log) in xxxxxxx\az-func-cannot-load-assembly\azfunct1\HelloWorld.cs:line 29
var tsc = new TableServiceClient("UseDevelopmentStorage=true");
var tabc = tsc.GetTableClient("zzztest1");
await tabc.CreateIfNotExistsAsync();
Sample project with the issue: https://github.com/fhtino/publicissues/tree/main/az-func-cannot-load-assembly
Workaround: place _FunctionsSkipCleanOutput in the project file:
<PropertyGroup>
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
Expected behavior
no errors
Actual behavior
Exception: System.Memory.Data, Version=6.0.0.0 not found
Reproduction Steps
sample here: https://github.com/fhtino/publicissues/tree/main/az-func-cannot-load-assembly
Environment
- Visual Studio 2022 17.11.5
- Azure Functions Core Tools / Core Tools Version: 4.0.6518 (64-bit) / Function Runtime Version: 4.35.4.23179
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 35
- Comments: 98 (19 by maintainers)
Commits related to this issue
- Apply workaround to https://github.com/Azure/azure-functions-host/issues/10575 — committed to Particular/NServiceBus.AzureFunctions.InProcess.ServiceBus by andreasohlund 2 years ago
- Update to NServiceBus 9 (#866) * Bump major version * Add Fody reference * Bump TFM to net8.0 * Update to NServiceBus 9 packages * Separate public and private packages * Use latest Par... — committed to Particular/NServiceBus.AzureFunctions.InProcess.ServiceBus by bording 2 years ago
Alternative workaround
@satvu Thanks for the info. I have to say that this is very frustrating as a developer. It takes hours to find the root cause of an issue like this as an Azure Function developer, especially if the version increase was part of a bigger task (in my case a migration from the in-process model to the isolated model). I don’t really understand how a new package can be released to the public, if Azure itself is not ready to consume it. In my opinion the package should have been withdrawn until it can be used in Azure.
I can confirm that this alone as the single change, made it work as expected.
Just adding my two cents, as I just upgraded Microsoft.Azure.WebJobs.Extensions.ServiceBus to 5.22.2 and blew up all my Azure functions. Rolling back to 5.22.1 fixed the issue.
Microsoft.Azure.WebJobs.Extensions.ServiceBus: Could not load file or assembly 'System.Memory.Data, Version=6.0.0.0, Culture=neutral, PublicKeyREDACTED
Updating “Azure Functions toolsets and templates” in the Visual Studio options fixed this for me.
Exact same break scenario for me as well and other workarounds not effective
Only reverting
Microsoft.Azure.Functions.Worker.Extensions.EventGrid 3.4.3 package.to 3.4.2 workedThe current mitigation is to either downgrade the package bringing the dependency, or update the project configuration mentioned in the issue if using the .NET in-proc model:
For the .NET Isolated model, the impacted package (SignalR) must be downgraded. We will work with the appropriate team to delist in the meantime, as this was an invalid update. We’ll also be working with them to ensure this issue is prevented in the future.
A fix for this will be rolling out with the next host deployment. Thank you all for the report and patience.
Hi @satvu @NapalmCodes, What about *-slim images? They are still not working and weren’t published.
We have run into this too. How did these NuGet updates get released without a corresponding release of the dotnet isolated Azure Function base image
mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated9.0? Seems to me it should be a bit more coordinated or bump to a major version maybe?@Furrman After the fix for function host is fully rolled out, you will be able to use SignalR extensions 1.15.0 again. No separate fix for SignalR extensions is required.
Thank you so much, it worked 😃
I spent a significant amount of time resolving an issue involving dependencies on System.Memory.Data 6.0.0. Locally, I managed to get things working by manually replacing the DLL with version 6.0.0 in the AzureFunctionsTools folder at:
C:\Users\User\AppData\Local\AzureFunctionsTools\Releases\4.100.0\cli_x64However, on Azure, this isn’t possible due to the lack of access for patching DLLs directly. After extensive troubleshooting, I discovered that the recent upgrade to
Microsoft.Azure.Functions.Worker.Extensions.SignalRService 1.15.0was the root cause. Downgrading to1.14.1resolved the issue.This complex dependency setup clearly needs addressing. Ideally, we should also have more control over configuration in Azure to facilitate such troubleshooting. If there are any ways to achieve this, please let me know.
Having used Azure Functions since v1, I’ve found it to be a convenient but often frustrating service. The migration paths (e.g., isolated functions, v1 to v2) have been rocky, and these issues make maintaining reliable services challenging. I encourage proactive measures to improve stability in the Azure Functions ecosystem. 🙏
@satvu I can confirm the update.
Our functions are now on:
Also updating to Microsoft.Azure.Functions.Worker.Extensions.ServiceBus 5.22 is working now
Same issue when upgrading to: https://github.com/Azure/azure-functions-dotnet-worker/releases/tag/servicebus-extension-5.22.2 From version https://github.com/Azure/azure-functions-dotnet-worker/releases/tag/servicebus-extension-5.22.1
Rolling back fixed it, running on isolated workers, linux, dotnet 9 (build with latest sdk), deployed in west europe
What’s a valid test we can run to prevent this? So that we can catch this before deploying it?
I think 4.1037 is pretty much fully rolled out at this point (it was indeed slowed down due to some hotfix requirements).
As for Core Tools, v4.0.6821 is actually still on v4.1036 of the host - you should be able to see the version of the host that Core Tools is using when you run
func:When there is a new host version, we also release a new core tools version against that host so it will not automatically update for you - you will need to install the new version.
For v4.1037 of the host, Core Tools is not yet released but this is in progress (I believe this will be version 4.0.7030)
I encountered the same issue and resolved it by updating the Azure Core Tools to the latest version (4.0.6821). If you run into an error like the one below during the update, try reinstalling Azure Core Tools—it should resolve the issue:
Error:
Could not load file or assembly 'Microsoft.AspNetCore.Authentication.JwtBearer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.I hope this helps!
Glad it works for you but 1.15.0 contains fix to issue that my team is facing. For us moving to 1.14.0 is not possible. @fabiocav is it possible to deploy fix to SignalRService package as well? Do you have access to information if and when it can be deployed? Thanks in advance
@jviau how long does it typically take to get from merge to production?
This workaround did not work. We need a permanent solution. This issue must be addressed ASAP as it’s a roadblock.
We have the same issue with
Microsoft.Azure.Functions.Worker.Extensions.SignalRService 1.15.0. Downgrade to 1.14.1 resolves the issue and we can use the System-assigned managed identity again.Having the same issue for the latest
Microsoft.Azure.Functions.Worker.Extensions.SignalRService1.15.0 version. It blocks users from using managed identity to connect to SignalR Service.The prescribed workaround (see above: “<PropertyGroup><_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>”) worked. I guess I need to update to an isolated process, as recommended by Microsoft, sooner than I thought.
Just ran into this in June 2025. I downgraded my extensions bundle in host.json, and that seems to have fixed my issue:
{ "version": "2.0", "logging": { "applicationInsights": { "samplingSettings": { "isEnabled": true, "excludedTypes": "Request" } } }, "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[2.*, 3.0.0)" }, "concurrency": { "dynamicConcurrencyEnabled": true, "snapshotPersistenceEnabled": true } }I using MacOS and build a Python function. Was getting the same error. Just updated to 4.0.7030 and worked!
npm install -g azure-functions-core-tools
Fixed the issue by downgrading following 2 packages from latest to: “Azure.Messaging.ServiceBus” Version=“7.18.1” “Microsoft.Azure.Functions.Worker.Extensions.ServiceBus” Version=“5.22.1”
Thanks for the tip.
@JasonHough75 You need core-tools version 4.0.703 which has host version 4.1037. This is the latest released version.
@victorlinares dotnet-isolated images (see tags on docker hub) are currently in the process of being updated and should be done by April 18-25 as well.
4.1037 and higher versions are not yet available on Linux Dedicated for dotnet-isolated customers. Our current ETA for these customers is between April 18-April 25.
For those who are not on dotnet-isolated in Linux Dedicated and are unable to pick up a new host version on restart, please open a support ticket (through the Azure portal) for further investigation.
this following helped me:
@liliankasem: What is the timeline/ETA for the 4.0.7030 release? (see also comment in other bug/thread) - https://github.com/Azure/azure-functions-host/issues/10930#issuecomment-2744368245
@leadenmoth - I can’t comment if 1037 is available in those regions, but I can say that when an individual instance is not updated until it restarts. If you have always on instances, or a constant scale, it may be a bit before we force update those instances. This is for app continuity - an update involves downtime for those instances, so we are trying to minimize that.
I have the same problem:
I’m on a fresh .NET 8 project.
What’s interesting is that my function app was working until I added an eventgrid trigger function. I also added the Microsoft.Azure.Functions.Worker.Extensions.EventGrid 3.4.3 package.
The workaround proposed above does not work for me.
I’m on MacOS with VS-Code, not Windows and VS 2022. I only see the error on the portal after failed triggers sync.
Here is my .csproj file:
And the azure func:
Downgrading Microsoft.Azure.WebJobs.Extensions.Storage from 5.3.3 to 5.3.2 worked for me
I’ve got the same issue here regarding the SignalRService package. None of the workarounds fix anything in this instance, other than reverting to 1.14.1, including things I had tried from other places (for example using assembly binding redirects)
Would love to see a resolution for this.
Have exactly the same issue with
Microsoft.Azure.WebJobs.Extensions.EventHubsupdated to the newest version (6.3.6):None of the workarounds worked, so I just reverted to earlier versions of the assemblies and now it works: