Home > other >  Microsoft.Azure.WebJobs.Extensions.Http: Could not load file or assembly
Microsoft.Azure.WebJobs.Extensions.Http: Could not load file or assembly

Time:07-21

I'm working in a virtual environment in VS Code and I can't understand why I'm getting this error:

[2022-07-19T10:00:31.580Z] A host error has occurred during startup operation '609dfded-e9f5-4fc4-b3a3-554bde11a415'.
[2022-07-19T10:00:31.582Z] Microsoft.Azure.WebJobs.Extensions.Http: Could not load file or assembly 'System.Net.Http.Formatting, Version=5.2.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Value cannot be null. (Parameter 'provider')

Does anyone have any recommendations on what I should check?

Thanks

CodePudding user response:

My solution to this issue was to go into Windows Defender and exclude:

C:\Program Files\Microsoft\Azure Functions Core Tools\func.exe

I then reinstalled Azure Functions Core Tools v4 and everything worked as intended.

Ps. After excluding make sure to give time for your system to update. I restarted and all worked as intended. Hope this helps someone.

CodePudding user response:

I had this exact issue until Yesterday when I tried updating Azure Function Core Tools (https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v4,windows,csharp,portal,bash) That resolved the problem, and I now am able to run my function's project using the CLI

  • Related