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

Most upvoted comments

Alternative workaround

  <ItemGroup>
    <FunctionsPreservedDependencies Include="System.Memory.Data.dll" />
  </ItemGroup>

@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.

Alternative workaround

<ItemGroup>
 <FunctionsPreservedDependencies Include="System.Memory.Data.dll" />
</ItemGroup>

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

System.IO.FileNotFoundException:
   at Microsoft.Azure.WebJobs.ServiceBus.Config.ServiceBusExtensionConfigProvider.Initialize (Microsoft.Azure.WebJobs.Extensions.ServiceBus, Version=5.16.5.0, Culture=neutral, PublicKeyToken=92742159e12e44c8)
   at Microsoft.Azure.WebJobs.Host.DefaultExtensionRegistryFactory.Create (Microsoft.Azure.WebJobs.Host, Version=3.0.41.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\DefaultExtensionRegistryFactory.cs:38)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd (System.Collections.Concurrent, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService (Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService (Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Azure.WebJobs.WebJobsServiceCollectionExtensions+<>c.<AddWebJobs>b__3_6 (Microsoft.Azure.WebJobs.Host, Version=3.0.41.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\Hosting\WebJobsServiceCollectionExtensions.cs:101)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd (System.Collections.Concurrent, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService (Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService (Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.Azure.WebJobs.Script.WebHost.WebJobsScriptHostService+<UnsynchronizedStartHostAsync>d__58.MoveNext (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.1036.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/WebJobsScriptHostService.cs:351)

Updating “Azure Functions toolsets and templates” in the Visual Studio options fixed this for me.

Image

Image

I have the same problem:

Microsoft.Azure.WebJobs.Extensions.EventGrid: 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.

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:

<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net8.0</TargetFramework> <AzureFunctionsVersion>v4</AzureFunctionsVersion> <OutputType>Exe</OutputType> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> <ItemGroup> <FrameworkReference Include="Microsoft.AspNetCore.App" /> <PackageReference Include="Azure.Messaging.ServiceBus" Version="7.10.0" /> <PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" /> <PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="2.0.0" /> <PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" /> <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.EventGrid" Version="3.4.3" /> <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" /> <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.0.0" /> <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="5.1.0" /> <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs" Version="6.6.0" /> <PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.0" /> <PackageReference Include="System.Memory.Data" Version="6.0.0" /> </ItemGroup> <ItemGroup> <None Update="host.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> <None Update="local.settings.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToPublishDirectory>Never</CopyToPublishDirectory> </None> </ItemGroup> <ItemGroup> <Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext" /> </ItemGroup> <ItemGroup> <FunctionsPreservedDependencies Include="System.Memory.Data.dll" /> </ItemGroup> </Project> And the azure func:

namespace Adenes.Poc.DocGenerator.FunctionsAzure;

using System.Threading.Tasks; using Microsoft.Azure.Functions.Worker; using Microsoft.Extensions.Logging; using System.Diagnostics; using Adenes.Poc.DocGenerator.Abstractions; using Azure.Messaging.EventGrid;

public class EventGridGenerateInvoicePDF(ILogger<EventGridGenerateInvoicePDF> logger, IBlobHelperService blobHelperService, ITemplateEngine templateEngine, IConverter pdfConverter) { const string FileNameTemplateFluid = “FluidInvoiceTemplateSample”; private readonly ITemplateEngine _templateEngine = templateEngine; private readonly IPdfConverter _pdfConverter = pdfConverter; private readonly ILogger<EventGridGenerateInvoicePDF> _logger = logger;

[Function(nameof(EventGridGenerateInvoicePDF))]
public async Task Run(
    [EventGridTrigger] EventGridEvent eventGridEvent)
{
    _logger.LogInformation($"Event received: {eventGridEvent.EventType}");

    // Process the event data
    var invoiceData = eventGridEvent.Data.ToObjectFromJson<InvoiceData>();

    // Check if eventData is null 
    if (invoiceData == null)
    {
        throw new ArgumentNullException(nameof(invoiceData), "Event data cannot be null");
    }

    var watcher = Stopwatch.StartNew();

    // Do some stuff
    watcher.Stop();
    _logger.LogInformation($"Elapsed time is {watcher.ElapsedMilliseconds}ms.");
}

}

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 worked

The 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:

<ItemGroup>
    <FunctionsPreservedDependencies Include="System.Memory.Data.dll" />
</ItemGroup>

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?

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.

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

@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.

I have the same problem:

Microsoft.Azure.WebJobs.Extensions.EventGrid: 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.

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:

net8.0
v4
Exe
enable
enable


















  PreserveNewest


  PreserveNewest
  Never

And the azure func: namespace Adenes.Poc.DocGenerator.FunctionsAzure; using System.Threading.Tasks; using Microsoft.Azure.Functions.Worker; using Microsoft.Extensions.Logging; using System.Diagnostics; using Adenes.Poc.DocGenerator.Abstractions; using Azure.Messaging.EventGrid; public class EventGridGenerateInvoicePDF(ILogger logger, IBlobHelperService blobHelperService, ITemplateEngine templateEngine, IConverter pdfConverter) { const string FileNameTemplateFluid = “FluidInvoiceTemplateSample”; private readonly ITemplateEngine _templateEngine = templateEngine; private readonly IPdfConverter _pdfConverter = pdfConverter; private readonly ILogger _logger = logger;

[Function(nameof(EventGridGenerateInvoicePDF))]
public async Task Run(
    [EventGridTrigger] EventGridEvent eventGridEvent)
{
    _logger.LogInformation($"Event received: {eventGridEvent.EventType}");

    // Process the event data
    var invoiceData = eventGridEvent.Data.ToObjectFromJson<InvoiceData>();

    // Check if eventData is null 
    if (invoiceData == null)
    {
        throw new ArgumentNullException(nameof(invoiceData), "Event data cannot be null");
    }

    var watcher = Stopwatch.StartNew();

    // Do some stuff
    watcher.Stop();
    _logger.LogInformation($"Elapsed time is {watcher.ElapsedMilliseconds}ms.");
}

}

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 worked

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_x64

However, 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.0 was the root cause. Downgrading to 1.14.1 resolved 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:

  • 4.1038.300.25164 for Consumption
  • 4.1038.400.1 for Linux Plan (no container)

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:

> func

Azure Functions Core Tools
Core Tools Version:       4.0.6821 Commit hash: N/A +c09a2033faa7ecf51b3773308283af0ca9a99f83 (64-bit)
Function Runtime Version: 4.1036.1.23224 // look here for the host version

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!

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.

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

Noticed this was re-opened to track deployment.

@jviau how long does it typically take to get from merge to production?

<ItemGroup>
 <FunctionsPreservedDependencies Include="System.Memory.Data.dll" />
</ItemGroup>

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.SignalRService 1.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.

Wer are using nodejs and as such can not use @nodeomega 's workaround. Is there any way to maybe downgrade, so it can work again?

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:

npm install -g azure-functions-core-tools@latest --unsafe-perm true

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)

@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:

Microsoft.Azure.WebJobs.Extensions.EventGrid: 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.

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:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <AzureFunctionsVersion>v4</AzureFunctionsVersion>
    <OutputType>Exe</OutputType>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>
  <ItemGroup>
    <FrameworkReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Azure.Messaging.ServiceBus" Version="7.10.0" />
    <!-- Application Insights isn't enabled by default. See https://aka.ms/AAt8mw4. -->
    <PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="2.0.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.EventGrid"
      Version="3.4.3" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore"
      Version="2.0.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus"
      Version="5.1.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs"
      Version="6.6.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.0" />
    <PackageReference Include="System.Memory.Data" Version="6.0.0" />
  </ItemGroup>
  <ItemGroup>
    <None Update="host.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="local.settings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <CopyToPublishDirectory>Never</CopyToPublishDirectory>
    </None>
  </ItemGroup>
  <ItemGroup>
    <Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext" />
  </ItemGroup>
  <ItemGroup>
    <FunctionsPreservedDependencies Include="System.Memory.Data.dll" />
  </ItemGroup>
</Project>

And the azure func:


namespace Adenes.Poc.DocGenerator.FunctionsAzure;

using System.Threading.Tasks;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.Logging;
using System.Diagnostics;
using Adenes.Poc.DocGenerator.Abstractions;
using Azure.Messaging.EventGrid;

public class EventGridGenerateInvoicePDF(ILogger<EventGridGenerateInvoicePDF> logger, IBlobHelperService blobHelperService, ITemplateEngine templateEngine, IConverter pdfConverter)
{
    const string FileNameTemplateFluid = "FluidInvoiceTemplateSample";
    private readonly ITemplateEngine _templateEngine = templateEngine;
    private readonly IPdfConverter _pdfConverter = pdfConverter;
    private readonly ILogger<EventGridGenerateInvoicePDF> _logger = logger;

    [Function(nameof(EventGridGenerateInvoicePDF))]
    public async Task Run(
        [EventGridTrigger] EventGridEvent eventGridEvent)
    {
        _logger.LogInformation($"Event received: {eventGridEvent.EventType}");

        // Process the event data
        var invoiceData = eventGridEvent.Data.ToObjectFromJson<InvoiceData>();

        // Check if eventData is null 
        if (invoiceData == null)
        {
            throw new ArgumentNullException(nameof(invoiceData), "Event data cannot be null");
        }

        var watcher = Stopwatch.StartNew();

        // Do some stuff
        watcher.Stop();
        _logger.LogInformation($"Elapsed time is {watcher.ElapsedMilliseconds}ms.");
    }

}

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.EventHubs updated to the newest version (6.3.6):

Could not load file or assembly 'System.Memory.Data, Version=6.0.0.0

None of the workarounds worked, so I just reverted to earlier versions of the assemblies and now it works:

<PackageReference Include="Azure.Identity" Version="1.13.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.4" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.3.2" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="1.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.EventHubs" Version="6.3.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.SignalRService" Version="1.14.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Tables" Version="1.3.0" />