azure-functions-core-tools: System.Private.CoreLib: Could not load file or assembly 'Microsoft.AspNetCore.Http.Abstractions'
C:\Users\erics\AppData\Roaming\npm
-- azure-functions-core-tools@2.0.1-beta.21 +-- chalk@2.3.0 |
– ansi-styles@3.2.0
| -- color-convert@1.9.1
– unzipper@0.8.11
`-- big-integer@1.6.26
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 20 (2 by maintainers)
Same issue for me. Pre-conditions: C# function, .Net Standard 2.0, WindowsAzure.Storage 8.7.0
Could not load assembly WindowsAzure.Storage (or similar). Nothing worked, until I downgraded WindowsAzure.Storage to 8.6.0. This is a version I’ve seen when NPM was restoring dependencies for Functions SDK. Downgraded, cleaned, re-compiled - voila!
I am also seeing this when trying to debug a new Functions project from a new install of VS2017 15.5.2.
Am getting same error message when running azure functions project locally. Targetting .net standard 2.0. Using .net sdk functions 1.0.6 and it worked ok initially for the “Function1” freebie function. Then added reference to Microsoft.AspNetCore.Authentication.JwtBearer and immediately get this error.
I also tried installing System.IdentityModel.Tokens.Jwt package [i just want to parse a jwt]. this works in local debugging but fails when I publish it to azure.
Is it just me or is version hell back with a massive vengeance in .net core space - possibly worse than ever before?
The similar issue for the prerelease version of Azure.KeyVault
Could not load file or assembly 'Microsoft.Azure.KeyVault, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)
Just for fun, I get it on the actual Azure portal. The code is merely from the Azure samples.
Thanks @evgeny-n for your workaround. Updating the Azure Functions and Web Jobs Tools to the latest version might also help.
Also had same issue with WindowsAzure.Storage 9.0 and 8.7. Had to downgrade to 8.6. Thanks for the workaround evgeny-n !
Did not have this issue with Azure functions V1 (.Net Framework). Occurred when I ported to V2 (.Net Standard 2.0)
I am getting the same error in
VS2017 15.5.2
It seems related to the fact that the cli loads a certain version of the dll then you try to reference a different version. I am having a similar issue with WindowsAzure.StorageSeems related to https://github.com/Azure/azure-functions-cli/issues/335 and https://github.com/Azure/azure-functions-cli/issues/253
also seeing it now, when trying to debug new function in VS2017 15.5.2 using SDK.Functions 1.0.7 on SDK.Functions 1.0.6 it is working. after upgrading start to fail you test it using the default sample function that is created by VS2017