I am currently developing an Azure Function in VS Code. I am encountering an error that has already been reported in this GitHub issue. In full, the error reads: Microsoft.Azure.WebJobs.Extensions.ServiceBus: Could not load type 'Microsoft.Azure.WebJobs.ParameterBindingData' from assembly 'Microsoft.Azure.WebJobs, Version=3.0.34.0, Culture=neutral, PublicKeyToken=****'. Value cannot be null. (Parameter 'provider')
One of the suggested solutions is to downgrade the package version of the Microsoft.Azure.WebJobs.Extensions.Storage
. However, I do not know how to downgrade a package from an extension bundle. In my local development environment, I'm using the following default host.json
configuration:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.15.0, 4.0.0)"
}
}
I already tried multiple version ranges, each lead to the same error.
Since I'm not familiar with .NET
, I would appreciate any help or advice on how to downgrade the package to resolve this issue. Thank you.
Additional information: I am developing an EventHub Triggered Function locally using the test trigger:
@app.function_name(name="EventHubTrigger1")
@app.event_hub_message_trigger(arg_name="myhub", event_hub_name="samples-workitems",
connection="")
def test_function(myhub: func.EventHubEvent):
logging.info('Python EventHub trigger processed an event: %s',
myhub.get_body().decode('utf-8'))
The local.settings.json
is as follows:
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "python",
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsFeatureFlags": "EnableWorkerIndexing"
}
}
Update: Another way to solve this issue was to reinstall/ update the azure function core tools using these commands:
sudo apt-get update
sudo apt-get install azure-functions-core-tools-4