I got a warning regarding the EOL of runtime 2.x and python 3.8 of the azure functions currently running. So I changed of the runtime setting to ~4 and python version to >=3.9 in the Settings/Configuration of the function app.
After restart the function app, I got an error of minimal version requirement of the Azure.Functions.ExtensionBundle, and requires me to change the host.json.
Error code
AZFD0005
Level
Error
Message
Error building configuration in an external startup class.
Details
Microsoft.Azure.WebJobs.Script.ExternalStartupException : Error building configuration in an external startup class. ---> Microsoft.Azure.WebJobs.Script.HostInitializationException : Referenced bundle Microsoft.Azure.Functions.ExtensionBundle of version 1.8.1 does not meet the required minimum version of 2.6.1. Update your extension bundle reference in host.json to reference 2.6.1 or later. ....
Then I clone the source code of the function app to local and change the host.json, in which I change the "version" of the "extension bundle" to [3.3.0, 4.0.0).
I also change the projectruntime to ~4 in the 'settings.json' (both of them)

Then save, commit, sync and deploy the changes to the function app.
After deployment and restart of the function app, I can see the changes from the portal

But I still get the same error as if the version of the extensionbundle has not been changed.

- So I am not sure which part I did wrong, any help will be really appreciated.
Thanks!