0
votes

Hi I am getting below issue,this is a python function

"

The binding type(s) 'serviceBusTrigger' are not registered. Please ensure the type is correct and the binding extension is installed."

My function.json:

{
  "scriptFile": "__init__.py",
  "bindings": [
    {
      "name": "msg",
      "type": "serviceBusTrigger",
      "direction": "in",
      "queueName": "queuest",
      "connection": "AzureWebJobsAzureSBConnection"      
    }
  ]
}

My extensions.csproj file is:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <WarningsAsErrors></WarningsAsErrors>
    <DefaultItemExcludes>**</DefaultItemExcludes>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="3.0.3" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.0" />
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.24" />
  </ItemGroup>
</Project>
1

1 Answers

2
votes

I can reproduce this problem, this is caused by the incomplete extension.

enter image description here

In local you don't need the extensions.csproj file, you should set the host.json content, following this doc: Extension bundles for local development

{
    "version": "2.0",
    "extensionBundle": {
        "id": "Microsoft.Azure.Functions.ExtensionBundle",
        "version": "[1.*, 2.0.0)"
    }
}

Note:If you already have this value in the host.json, go to C:\Users....\AppData\Local\Temp\Functions\ExtensionBundles delete ExtensionBundles folder. Then restart your function, it will download the extension. Then it should work.