Technical questionAccepted answer
Microsoft.Azure.WebJobs.Extensions.Http: Could not load file or assembly
geojoe
Jul 19
0 views1
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')
What should I check?
1 answer
Accepted answer · original discussion
geojoe
PermalinkJul 20
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.
3 question comments
Use comments to ask for clarification. Post a solution as an answer.
Sairam TadepalliPermalink
Jul 19
Could you please provide the .csproj package references file ?
Victorio BerraPermalink
Jul 20
Having the same issue. @SairamTadepalli-MT this error is from Azure Functions Core Tools, not the posters project.
geojoePermalink
Jul 20
@VictorioBerra For me, my Windows Defender was the issue. I was unable to execute pip.exe or func.exe. What I would recommend is excluding the entire path to your Azure Function Core Tools. Once you've done that, reinstall Azure Function Core Tools v4.