azure-functions-core-tools
azure-functions-core-tools copied to clipboard
Function startup fails when using System.Memory.Data 6.0.0
When attempting to start a v4 function app that uses System.Memory.Data 6.0.0, startup fails due to the following error:
[2021-12-14T19:33:56.629Z] A host error has occurred during startup operation 'd5f7db36-8721-4169-9c45-6fc51fc33530'.
[2021-12-14T19:33:56.638Z] App: 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.
Value cannot be null. (Parameter 'provider')
The version of System.Memory.Data delivered in Core Tools 4.10.1 is 1.0.2. Replacing this DLL with a 6.0.0 version in the Core Tools CLI directory resolves this startup error.
(Replaced %USERPROFILE%\AppData\Local\AzureFunctionsTools\Releases\4.10.1\cli_x64\System.Memory.Data.dll)
This is also preventing startup when deployed to Azure.

Workaround: adding <_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput> to the project file.
Is there any update on this? We are experiencing the same issue when trying to make a call to blob storage on functions 4 / .NET 6. The workaround with _FunctionsSkipCleanOutput works, but it would be great to not be forced to use some workaround flags.
Just ran into this myself; Is there a more broadly applicable fix to issues of this nature? Seems like it would be a problem any time there's a version mismatch regardless of which dependency it is.