Tips on Azure Function
Created on: 28 Feb 22 11:50 +0700 by Son Nguyen Hoang in English
Some tips and solutions for bugs
- This article is under ongoing development hence the content may be updated and changed regularly.
- Error when running
func host start
orfunc start
from the terminal.
Version
Core Tool: 4.0.3971 Function Runtime Verison: 4.0.1.16815
Error Content
Azure Functions Core Tools
Core Tools Version: 4.0.3971 Commit hash: d0775d487c93ebd49e9c1166d5c3c01f3c76eaaf (64-bit)
Function Runtime Version: 4.0.1.16815
Can't determine project language from files. Please use one of [--csharp, --javascript, --typescript, --java, --python, --powershell, --custom]
Value cannot be null. (Parameter 'provider')
Also, sometime the terminal refuse to execute and wait infinitely after this log
Azure Functions Core Tools
Core Tools Version: (VERSION CODE) Commit hash: (Hide on purpose) (64-bit)
Function Runtime Version: (VERSION CODE)
Solution
- Go to
host.json
- Remove the below lines:
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
}
- Display all logs when running Azure locally
Solution
- Go to
host.json
- Edit “logging” like below
"logging": {
"logLevel": {
"default": "Debug"
}
}