azure-functions-core-tools icon indicating copy to clipboard operation
azure-functions-core-tools copied to clipboard

Function startup fails when using System.Memory.Data 6.0.0

Open EvanMulawski opened this issue 3 years ago • 16 comments
trafficstars

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)

EvanMulawski avatar Dec 14 '21 19:12 EvanMulawski

This is also preventing startup when deployed to Azure.

image

EvanMulawski avatar Dec 18 '21 04:12 EvanMulawski

Workaround: adding <_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput> to the project file.

EvanMulawski avatar Dec 20 '21 16:12 EvanMulawski

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.

bartsokol avatar Jun 08 '22 07:06 bartsokol

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.

bhehe avatar Jul 26 '22 20:07 bhehe